summaryrefslogtreecommitdiff
path: root/apt-pkg/cachefilter-patterns.h
Commit message (Collapse)AuthorAgeFilesLines
* Implement ?reverse-depends/~R and friendsJulian Andres Klode2020-12-271-0/+21
| | | | This was easy.
* patterns: Add dependency patterns ?depends, ?conflicts, etc.Julian Andres Klode2020-12-271-0/+22
| | | | | | 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.
* Mark PatternTreeParser::Node destructor as virtualDavid Kalnischkies2020-05-251-0/+1
| | | | | | | | | 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
* apt-pkg: default visibility to hiddenJulian Andres Klode2020-02-261-1/+1
|
* Fix various compiler warningsJulian Andres Klode2020-02-261-1/+1
|
* patterns: Mark things hidden, and only allow internal use of headerJulian Andres Klode2020-02-251-33/+38
|
* patterns: test for empty terms, reject themJulian Andres Klode2020-02-031-1/+1
|
* Correctly stop parsing short form arguments on space, also on ?Julian Andres Klode2020-02-031-2/+2
| | | | | | | | | 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))...
* patterns: Implement parsing of (...) groupsJulian Andres Klode2020-02-031-0/+1
|
* Implement | as orJulian Andres Klode2020-02-031-0/+1
|
* patterns: Parse sequence of patterns as ?andJulian Andres Klode2020-02-031-0/+1
|
* patterns: Allow bare words only in argumentsJulian Andres Klode2020-02-031-0/+1
| | | | | | | | | | | | | | | | 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
* patterns: Implement unary !Julian Andres Klode2020-02-031-0/+2
|
* Implement short patterns (patterns starting with ~)Julian Andres Klode2020-02-031-0/+1
| | | | | | 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.
* patterns: Provide Node constructor, simplify error throwingJulian Andres Klode2020-02-031-0/+2
| | | | | By having a node constructor, we can construct a node inline for error reporting needs, simplifying the code a bit.
* patterns: Make offset a size_t instead of off_tJulian Andres Klode2020-02-031-1/+1
| | | | This allows comparing against sentence.size()
* patterns: Add ?sectionJulian Andres Klode2019-11-261-0/+10
|
* patterns: Add ?all-versionsJulian Andres Klode2019-11-261-0/+19
|
* patterns: Add ?any-versionJulian Andres Klode2019-11-261-0/+11
|
* patterns: Add ?originJulian Andres Klode2019-11-251-0/+15
|
* patterns: Add ?archiveJulian Andres Klode2019-11-251-0/+15
|
* patterns: Add ?source-name and ?source-versionJulian Andres Klode2019-11-251-0/+20
|
* patterns: Add ?versionJulian Andres Klode2019-11-251-0/+25
|
* patterns: Add base class for regular expression matchingJulian Andres Klode2019-11-251-0/+15
|
* Add ?virtual patternJulian Andres Klode2019-08-151-0/+8
| | | | This matches any package that does not have versions.
* Add the ?exact-name patternJulian Andres Klode2019-08-151-0/+10
| | | | | | 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/+7
| | | | | | 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/+12
| | | | | 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/+19
| | | | | | 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/+35
| | | | | | | | | 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/+26
| | | | | | 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 pattern tree parser infra and connect with cacheset and apt listJulian Andres Klode2019-08-151-0/+15
| | | | | This adds a transformation from parse tree into a CacheFilter and connects it with cachesets and the apt list command.
* Add initial support for parsing patterns into parse treesJulian Andres Klode2019-08-151-0/+103
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.