summaryrefslogtreecommitdiff
path: root/apt-pkg/cachefilter-patterns.h
AgeCommit message (Collapse)Author
2020-12-27Implement ?reverse-depends/~R and friendsJulian Andres Klode
This was easy.
2020-12-27patterns: Add dependency patterns ?depends, ?conflicts, etc.Julian Andres Klode
These match the target package, not target versions which is slightly unfortunate but might make sense. Maybe we should add a version that matches Versions instead.
2020-05-25Mark PatternTreeParser::Node destructor as virtualDavid Kalnischkies
The non-virtual base-destructor causes its derivate classes to leak tiny bits of memory otherwise. The header is private and not to be used outside of APT, so we can perform this tiny ABI break as there is no ABI to break. Reported-By: valgrind and clang -fsanitize=leak
2020-02-26apt-pkg: default visibility to hiddenJulian Andres Klode
2020-02-26Fix various compiler warningsJulian Andres Klode
2020-02-25patterns: Mark things hidden, and only allow internal use of headerJulian Andres Klode
2020-02-03patterns: test for empty terms, reject themJulian Andres Klode
2020-02-03Correctly stop parsing short form arguments on space, also on ?Julian Andres Klode
we have to stop parsing on space so that things like ~ramd64 | ~rall work correctly. aptitude does not stop parsing on ?, but we'll do as it gets very confusing otherwise if you write stuff like ~ramd64?name(foo), and it resolves to ?and(?architecture(amd64?name), (foo))...
2020-02-03patterns: Implement parsing of (...) groupsJulian Andres Klode
2020-02-03Implement | as orJulian Andres Klode
2020-02-03patterns: Parse sequence of patterns as ?andJulian Andres Klode
2020-02-03patterns: Allow bare words only in argumentsJulian Andres Klode
This changes the syntax from approximately expr = unary unary = '!'? primary primary = pattern | short-pattern | word | quoted-word pattern = '?' name [ '(' expr [',' expr]* ')' ] short-pattern = ~ name | ~name expr to: primary = pattern | short-pattern argument = word | quoted-word | expr pattern = '?' name [ '(' argument [',' argument]* ')' ] short-pattern = ~ name | ~name argument
2020-02-03patterns: Implement unary !Julian Andres Klode
2020-02-03Implement short patterns (patterns starting with ~)Julian Andres Klode
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.
2020-02-03patterns: Provide Node constructor, simplify error throwingJulian Andres Klode
By having a node constructor, we can construct a node inline for error reporting needs, simplifying the code a bit.
2020-02-03patterns: Make offset a size_t instead of off_tJulian Andres Klode
This allows comparing against sentence.size()
2019-11-26patterns: Add ?sectionJulian Andres Klode
2019-11-26patterns: Add ?all-versionsJulian Andres Klode
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-11-25patterns: Add base class for regular expression matchingJulian 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 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.
2019-08-15Add initial support for parsing patterns into parse treesJulian Andres Klode
Introduce a parser for patterns that generates a parse tree. The language understood by the parser is: pattern = '?'TERM | '?'TERM '(' pattern (',' pattern)* ','? ')' | WORD | QUOTED-WORD TERM = [0-9a-zA-Z-] WORD = [0-9a-ZA-Z-.*^$\[\]_\\] QUOTED_WORD = "..." # you know what I mean This language is context free, which is a massive simplification from aptitude's language, where ?foo(bar) could have two different meanings depending on whether ?foo takes an argument or not.