diff options
author | Julian Andres Klode <julian.klode@canonical.com> | 2019-08-15 13:35:01 +0200 |
---|---|---|
committer | Julian Andres Klode <julian.klode@canonical.com> | 2019-08-15 20:21:34 +0200 |
commit | 08762e0e4e2923360339eeb4d8ed26a00d7f1de5 (patch) | |
tree | 5e6aa36f27e8d8dee343c6aec57a120c5032bd5f /apt-pkg/cachefilter-patterns.cc | |
parent | 9282c9094ab3e77cebe90e97b2f9a5fc21463e2f (diff) |
Add ?essential pattern
This matches all packages where at least one of the versions
is marked essential; or well, whenver apt considers a package
essential.
Diffstat (limited to 'apt-pkg/cachefilter-patterns.cc')
-rw-r--r-- | apt-pkg/cachefilter-patterns.cc | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/apt-pkg/cachefilter-patterns.cc b/apt-pkg/cachefilter-patterns.cc index a180cf78e..ea35b9c46 100644 --- a/apt-pkg/cachefilter-patterns.cc +++ b/apt-pkg/cachefilter-patterns.cc @@ -216,6 +216,8 @@ std::unique_ptr<APT::CacheFilter::Matcher> PatternParser::aPattern(std::unique_p return std::make_unique<Patterns::PackageIsBroken>(file); if (node->matches("?config-files", 0, 0)) return std::make_unique<Patterns::PackageIsConfigFiles>(); + if (node->matches("?essential", 0, 0)) + return std::make_unique<Patterns::PackageIsEssential>(); if (node->matches("?false", 0, 0)) return std::make_unique<APT::CacheFilter::FalseMatcher>(); if (node->matches("?garbage", 0, 0)) |