summaryrefslogtreecommitdiff
path: root/test/integration/test-apt-patterns
Commit message (Collapse)AuthorAgeFilesLines
* add pattern to select packages by priority (closes: #989558)Johannes Schauer Marin Rodrigues2021-10-041-2/+8
|
* apt list: Fix behavior of regex vs fnmatch vs wildcardsJulian Andres Klode2020-05-041-4/+4
| | | | | | | | | | | | | | | | | | | | | | | 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.
* Reinstate * wildcardsJulian Andres Klode2020-05-041-0/+34
| | | | | | | | | | | | Reinstate * wildcards as they are safe to use, but do not allow any other special characters such as ? or []. Notably, ? would overlap with patterns, and [] might overlap with future pattern extensions (alternative bracketing style), it's also hard to explain. Closes: #953531 LP: #1872200
* Don't crash pattern matching sections if pkg has no sectionDavid Kalnischkies2020-03-101-1/+24
| | | | | | | | Packages from third-party sources do not always follow the established patterns of more properly maintained archives. In that case it was a driver package for a scanner&printer device which has only a minimum of info attached, but also minimal non-installed packages do not include sections, so we really shouldn't assume their availability.
* apt(8): Disable regular expressions and fnmatchJulian Andres Klode2020-01-151-10/+1
| | | | | This is the first step. Next step will be to add warnings to apt-get and then remove support there as well.
* patterns: Add ?sectionJulian Andres Klode2019-11-261-2/+7
|
* patterns: Add ?all-versionsJulian Andres Klode2019-11-261-0/+3
|
* patterns: Implement ?narrow(...), as ?any-version(?and(...))Julian Andres Klode2019-11-261-0/+4
| | | | | This is pure syntactic sugar - ?narrow does not exist in the abstract syntax.
* patterns: Add ?any-versionJulian Andres Klode2019-11-261-0/+14
|
* patterns: Add ?originJulian Andres Klode2019-11-251-0/+6
|
* patterns: Add ?archiveJulian Andres Klode2019-11-251-0/+5
|
* patterns: Add ?source-name and ?source-versionJulian Andres Klode2019-11-251-2/+9
|
* patterns: Add ?versionJulian Andres Klode2019-11-251-0/+4
|
* Add ?virtual patternJulian Andres Klode2019-08-151-0/+6
| | | | This matches any package that does not have versions.
* Add the ?exact-name patternJulian Andres Klode2019-08-151-0/+4
| | | | | | The ?exact-name pattern matches the name exactly, there is no substring matching going on, or any regular expression or fnmatch magic.
* Add ?essential patternJulian Andres Klode2019-08-151-0/+3
| | | | | | This matches all packages where at least one of the versions is marked essential; or well, whenver apt considers a package essential.
* Add ?broken patternJulian Andres Klode2019-08-151-0/+3
| | | | | This matches all packages that have broken dependencies in the installed version or the version selected for install.
* Add ?config-files and ?installed patternsJulian Andres Klode2019-08-151-0/+18
| | | | | | These two are mutually exclusive states of installed-ness. And ?installed package is fully unpacked and configured; a ?config-files package only has config files left.
* Add ?obsolete and ?upgradable patternsJulian Andres Klode2019-08-151-0/+10
| | | | | | | | | These match packages that have no version in a repository, or where an upgrade is available. Notably, ?and(?obsolete,?upgradable) == ?false because an upgradable package is by definition not obsolete.
* Add ?automatic and ?garbage patternsJulian Andres Klode2019-08-151-0/+6
| | | | | | These patterns allow you to identify automatically installed packages, as well as automatically installed packages that are no longer reachable from the manually installed ones.
* Add patterns for the existing CacheFilter::Matcher classesJulian Andres Klode2019-08-151-0/+62
| | | | | | | This implements the basic logic patterns: ?and ?false ?not ?or ?true and the basic package patterns: ?architecture ?name ?x-name-fnmatch
* Add pattern tree parser infra and connect with cacheset and apt listJulian Andres Klode2019-08-151-0/+61
This adds a transformation from parse tree into a CacheFilter and connects it with cachesets and the apt list command.