summaryrefslogtreecommitdiff
path: root/apt-pkg/cachefilter-patterns.cc
diff options
context:
space:
mode:
authorJulian Andres Klode <julian.klode@canonical.com>2019-08-15 13:31:30 +0200
committerJulian Andres Klode <julian.klode@canonical.com>2019-08-15 20:21:34 +0200
commita3e9ab661b2d670f7d0da53a5f56c52af0763c5b (patch)
treebf064b629923e5d9598ea42114521376b8e3385b /apt-pkg/cachefilter-patterns.cc
parent89790c11799c4144e37a6a1f0dbe0f6fff89ea89 (diff)
Add ?config-files and ?installed patterns
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.
Diffstat (limited to 'apt-pkg/cachefilter-patterns.cc')
-rw-r--r--apt-pkg/cachefilter-patterns.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/apt-pkg/cachefilter-patterns.cc b/apt-pkg/cachefilter-patterns.cc
index b97d65a03..0f23890b4 100644
--- a/apt-pkg/cachefilter-patterns.cc
+++ b/apt-pkg/cachefilter-patterns.cc
@@ -212,10 +212,14 @@ std::unique_ptr<APT::CacheFilter::Matcher> PatternParser::aPattern(std::unique_p
return std::make_unique<APT::CacheFilter::PackageArchitectureMatchesSpecification>(aWord(node->arguments[0]));
if (node->matches("?automatic", 0, 0))
return std::make_unique<Patterns::PackageIsAutomatic>(file);
+ if (node->matches("?config-files", 0, 0))
+ return std::make_unique<Patterns::PackageIsConfigFiles>();
if (node->matches("?false", 0, 0))
return std::make_unique<APT::CacheFilter::FalseMatcher>();
if (node->matches("?garbage", 0, 0))
return std::make_unique<Patterns::PackageIsGarbage>(file);
+ if (node->matches("?installed", 0, 0))
+ return std::make_unique<Patterns::PackageIsInstalled>(file);
if (node->matches("?name", 1, 1))
return std::make_unique<APT::CacheFilter::PackageNameMatchesRegEx>(aWord(node->arguments[0]));
if (node->matches("?not", 1, 1))