summaryrefslogtreecommitdiff
path: root/apt-pkg/cachefilter-patterns.h
diff options
context:
space:
mode:
authorJulian Andres Klode <julian.klode@canonical.com>2019-11-26 12:01:42 +0100
committerJulian Andres Klode <julian.klode@canonical.com>2019-11-26 12:01:42 +0100
commita93b4443c18ee211691f7b336b161fea7d1df699 (patch)
treeedfa02e104ff9f55948de510f2caf6f7f1665bfe /apt-pkg/cachefilter-patterns.h
parent96f795bce665a1907b885bd2d57d6ab22b0a4199 (diff)
patterns: Add ?section
Diffstat (limited to 'apt-pkg/cachefilter-patterns.h')
-rw-r--r--apt-pkg/cachefilter-patterns.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/apt-pkg/cachefilter-patterns.h b/apt-pkg/cachefilter-patterns.h
index 8c5561c82..bd8ce7e7e 100644
--- a/apt-pkg/cachefilter-patterns.h
+++ b/apt-pkg/cachefilter-patterns.h
@@ -320,6 +320,16 @@ struct VersionIsOrigin : public VersionAnyMatcher
}
};
+struct VersionIsSection : public VersionAnyMatcher
+{
+ BaseRegexMatcher matcher;
+ VersionIsSection(std::string const &pattern) : matcher(pattern) {}
+ bool operator()(pkgCache::VerIterator const &Ver) override
+ {
+ return matcher(Ver.Section());
+ }
+};
+
struct VersionIsSourcePackage : public VersionAnyMatcher
{
BaseRegexMatcher matcher;