summaryrefslogtreecommitdiff
path: root/apt-private/private-list.cc
Commit message (Collapse)AuthorAgeFilesLines
* apt list: Fix behavior of regex vs fnmatch vs wildcardsJulian Andres Klode2020-05-041-4/+5
| | | | | | | | | | | | | | | | | | | | | | | Previously (and still in cacheset), patterns where only allowed to start with ? or ~, which ignores the fact that a pattern might just as well start with a negation, such a !~nfoo. Also, we ignored the --regex flag if it looked like this, which was somewhat bad. Let's change this all: * If --regex is given, arguments are always interpreted as regex * If it is a valid package wildcard (name or * characters), then it will be interpreted as a wildcard - this set of characters is free from meaningful overlap with patterns. * Otherwise, the argument is interpreted as a pattern. For a future version, we need to adapt parsing for cacheset and list to use a common parser, to avoid differences in their interpretation. Likely, this code will go into the pattern parser, such that it generates a pattern given a valid fnmatch argument for example.
* Implement short patterns (patterns starting with ~)Julian Andres Klode2020-02-031-2/+2
| | | | | | Also make pattern detector in cacheset and private's list accept such patterns. We probably should just try to parse and see if it is a (start of a) pattern.
* Add pattern tree parser infra and connect with cacheset and apt listJulian Andres Klode2019-08-151-7/+16
| | | | | This adds a transformation from parse tree into a CacheFilter and connects it with cachesets and the apt list command.
* Show all architectures in 'apt list' outputDavid Kalnischkies2018-09-151-1/+1
| | | | | | | | | The uniqueness in std::set containers is ensured by the ordering operator we provide, but it was not considering that different versions can have the same description like the different architectures for a version of a package. Closes: #908218
* Reformat and sort all includes with clang-formatJulian Andres Klode2017-07-121-4/+4
| | | | | | | | | | | | | This makes it easier to see which headers includes what. The changes were done by running git grep -l '#\s*include' \ | grep -E '.(cc|h)$' \ | xargs sed -i -E 's/(^\s*)#(\s*)include/\1#\2 include/' To modify all include lines by adding a space, and then running ./git-clang-format.sh.
* Drop cacheiterators.h includeJulian Andres Klode2017-07-121-1/+0
| | | | | Including cacheiterators.h before pkgcache.h fails because pkgcache.h depends on cacheiterators.h.
* fail instead of segfault on unreadable config filesDavid Kalnischkies2016-05-201-2/+2
| | | | | | | | | | | | | The report mentions "apt list --upgradable", but there are others which have inconsistent behavior ranging from segfaulting to doing something with the partial (and hence incomplete) data. We had a recent report about sources.list (#818628), this one mentions prefences, the obvious next step is conf files… so the testcase is adapted to check for all three in file and directory versions and run a bunch of commands each time which should all have more or less the same behavior in such a case (aka error out). Closes: 824503
* apply various suggestions made by cppcheckDavid Kalnischkies2015-11-051-1/+1
| | | | | Reported-By: cppcheck Git-Dch: Ignore
* Annotate more methods with APT_OVERRIDEJulian Andres Klode2015-08-111-1/+1
| | | | | | Gbp-Dch: ignore Reported-By: g++ -Wsuggest-override Thanks: g++ -Wsuggest-override
* Merge branch 'debian/sid' into debian/experimentalMichael Vogt2014-09-231-23/+18
|\ | | | | | | | | | | | | | | | | Conflicts: apt-pkg/acquire-item.cc apt-pkg/acquire-item.h apt-pkg/cachefilter.h configure.ac debian/changelog
| * make GetLocalitySortedVersionSet more genericDavid Kalnischkies2014-09-071-1/+1
| | | | | | | | | | | | | | | | | | No reason in and of by itself at the moment, but prepares for the goal of having 'apt search' and 'apt-cache search' using the same code now that they at least support the same stuff. The 'apt' code is just a multitude slower at the moment… Git-Dch: Ignore
| * implement --full in apt searchDavid Kalnischkies2014-09-071-22/+17
| |
| * Avoid yielding blank lines with APT::Cmd::use-format=trueAndreas Oberritter2014-09-021-1/+2
| |
| * The following command otherwise yields many blank lines:Andreas Oberritter2014-08-281-2/+1
| | | | | | | | | | | | | | | | apt list -o APT::Cmd::use-format=true -o APT::Cmd::format=\${Package} And even worse when adding "-o APT::Cmd::All-Versions=true". Signed-off-by: Andreas Oberritter <obi@opendreambox.org>
* | Merge branch 'debian/sid' into debian/experimentalMichael Vogt2014-05-071-37/+34
|\| | | | | | | | | | | | | | | | | | | | | | | Conflicts: apt-pkg/cachefilter.h apt-pkg/contrib/fileutl.cc apt-pkg/contrib/netrc.h apt-pkg/deb/debsrcrecords.cc apt-pkg/init.h apt-pkg/pkgcache.cc debian/apt.install.in debian/changelog
| * Notice the user about "apt list -a" when only a single hit if foundMichael Vogt2014-04-091-1/+14
| | | | | | | | | | | | If the user is using "apt list pattern" and there is only a single hit, notice about "--all-versions" as this is what the user may be interessted in
| * Fix crash in "apt list" when a sources.list file is unreableMichael Vogt2014-04-041-3/+2
| | | | | | | | Closes: 743413
| * cleanup headers and especially #includes everywhereDavid Kalnischkies2014-03-131-29/+14
| | | | | | | | | | | | | | | | Beside being a bit cleaner it hopefully also resolves oddball problems I have with high levels of parallel jobs. Git-Dch: Ignore Reported-By: iwyu (include-what-you-use)
| * warning: no previous declaration for foobar() [-Wmissing-declarations]David Kalnischkies2014-03-131-1/+1
| | | | | | | | | | Git-Dch: Ignore Reported-By: gcc -Wmissing-declarations
* | Merge branch 'debian/sid' into debian/experimentalMichael Vogt2014-02-271-21/+26
|\| | | | | | | | | | | | | | | Conflicts: apt-private/private-list.cc configure.ac debian/apt.install.in debian/changelog
| * Merge remote-tracking branch 'donkult/debian/sid' into debian/sidMichael Vogt2014-01-261-6/+6
| |\ | | | | | | | | | | | | | | | | | | Conflicts: apt-private/private-list.cc doc/po/de.po test/integration/framework
| | * correct some style/performance/warnings from cppcheckDavid Kalnischkies2014-01-161-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | The most "visible" change is from utime to utimensat/futimens as the first one isn't part of POSIX anymore. Reported-By: cppcheck Git-Dch: Ignore
| * | add missing integration test for "apt list"Michael Vogt2014-01-171-4/+8
| |/
| * Merge remote-tracking branch 'mvo/debian/sid' into debian/sidMichael Vogt2013-11-291-2/+2
| |\ | | | | | | | | | | | | Conflicts: apt-private/private-cmndline.cc
| | * rename APT::Cmd::AllVersions -> APT::Cmd::All-Versions, APT::Cmd::UseRegexp ↵Michael Vogt2013-11-261-2/+2
| | | | | | | | | | | | -> APT::Cmd::Use-Regexp
| * | add APT::Cmd::List-Include-SummaryMichael Vogt2013-11-261-1/+3
| |/
| * do not show summary in "apt list"Michael Vogt2013-11-251-1/+1
| |
| * fix vim-style foldmarkerDavid Kalnischkies2013-09-031-8/+7
| | | | | | | | Git-Dch: Ignore
* | [ABI-Break] remove the PACKAGE_MATCHER_ABI_COMPAT definesMichael Vogt2013-08-171-8/+0
|/
* add PACKAGE_MATCHER_ABI_COMPAT mode for now so that this branch can be ↵Michael Vogt2013-08-151-0/+9
| | | | merged without breaking ABI
* squash merge of the feature/apt-binary branch without the changes from ↵Michael Vogt2013-08-121-0/+158
experimental