summaryrefslogtreecommitdiff
path: root/test/integration/test-apt-patterns
AgeCommit message (Collapse)Author
2020-05-04apt list: Fix behavior of regex vs fnmatch vs wildcardsJulian Andres Klode
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.
2020-05-04Reinstate * wildcardsJulian Andres Klode
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
2020-03-10Don't crash pattern matching sections if pkg has no sectionDavid Kalnischkies
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.
2020-01-15apt(8): Disable regular expressions and fnmatchJulian Andres Klode
This is the first step. Next step will be to add warnings to apt-get and then remove support there as well.
2019-11-26patterns: Add ?sectionJulian Andres Klode
2019-11-26patterns: Add ?all-versionsJulian Andres Klode
2019-11-26patterns: Implement ?narrow(...), as ?any-version(?and(...))Julian Andres Klode
This is pure syntactic sugar - ?narrow does not exist in the abstract syntax.
2019-11-26patterns: Add ?any-versionJulian Andres Klode
2019-11-25patterns: Add ?originJulian Andres Klode
2019-11-25patterns: Add ?archiveJulian Andres Klode
2019-11-25patterns: Add ?source-name and ?source-versionJulian Andres Klode
2019-11-25patterns: Add ?versionJulian Andres Klode
2019-08-15Add ?virtual patternJulian Andres Klode
This matches any package that does not have versions.
2019-08-15Add the ?exact-name patternJulian Andres Klode
The ?exact-name pattern matches the name exactly, there is no substring matching going on, or any regular expression or fnmatch magic.
2019-08-15Add ?essential patternJulian Andres Klode
This matches all packages where at least one of the versions is marked essential; or well, whenver apt considers a package essential.
2019-08-15Add ?broken patternJulian Andres Klode
This matches all packages that have broken dependencies in the installed version or the version selected for install.
2019-08-15Add ?config-files and ?installed patternsJulian Andres Klode
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.
2019-08-15Add ?obsolete and ?upgradable patternsJulian Andres Klode
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.
2019-08-15Add ?automatic and ?garbage patternsJulian Andres Klode
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.
2019-08-15Add patterns for the existing CacheFilter::Matcher classesJulian Andres Klode
This implements the basic logic patterns: ?and ?false ?not ?or ?true and the basic package patterns: ?architecture ?name ?x-name-fnmatch
2019-08-15Add pattern tree parser infra and connect with cacheset and apt listJulian Andres Klode
This adds a transformation from parse tree into a CacheFilter and connects it with cachesets and the apt list command.