diff options
author | Julian Andres Klode <julian.klode@canonical.com> | 2019-08-15 13:36:04 +0200 |
---|---|---|
committer | Julian Andres Klode <julian.klode@canonical.com> | 2019-08-15 20:21:34 +0200 |
commit | af674d82d5cd36e22223ec49675d32adad07e0a9 (patch) | |
tree | ec87d76fccf193bc56756e56b0275d2701685f09 /apt-pkg/cachefilter-patterns.cc | |
parent | 08762e0e4e2923360339eeb4d8ed26a00d7f1de5 (diff) | |
download | apt-af674d82d5cd36e22223ec49675d32adad07e0a9.tar.gz |
Add the ?exact-name pattern
The ?exact-name pattern matches the name exactly, there is
no substring matching going on, or any regular expression
or fnmatch magic.
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 ea35b9c46..f078924ff 100644 --- a/apt-pkg/cachefilter-patterns.cc +++ b/apt-pkg/cachefilter-patterns.cc @@ -218,6 +218,8 @@ std::unique_ptr<APT::CacheFilter::Matcher> PatternParser::aPattern(std::unique_p return std::make_unique<Patterns::PackageIsConfigFiles>(); if (node->matches("?essential", 0, 0)) return std::make_unique<Patterns::PackageIsEssential>(); + if (node->matches("?exact-name", 1, 1)) + return std::make_unique<Patterns::PackageHasExactName>(aWord(node->arguments[0])); if (node->matches("?false", 0, 0)) return std::make_unique<APT::CacheFilter::FalseMatcher>(); if (node->matches("?garbage", 0, 0)) |