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.h | |
parent | 08762e0e4e2923360339eeb4d8ed26a00d7f1de5 (diff) |
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.h')
-rw-r--r-- | apt-pkg/cachefilter-patterns.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/apt-pkg/cachefilter-patterns.h b/apt-pkg/cachefilter-patterns.h index 17f1fc752..993839425 100644 --- a/apt-pkg/cachefilter-patterns.h +++ b/apt-pkg/cachefilter-patterns.h @@ -166,6 +166,16 @@ struct PackageIsEssential : public PackageMatcher } }; +struct PackageHasExactName : public PackageMatcher +{ + std::string name; + explicit PackageHasExactName(std::string name) : name(name) {} + bool operator()(pkgCache::PkgIterator const &Pkg) override + { + return Pkg.Name() == name; + } +}; + struct PackageIsInstalled : public PackageMatcher { pkgCacheFile *Cache; |