From a93b4443c18ee211691f7b336b161fea7d1df699 Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Tue, 26 Nov 2019 12:01:42 +0100 Subject: patterns: Add ?section --- apt-pkg/cachefilter-patterns.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'apt-pkg/cachefilter-patterns.h') 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; -- cgit v1.2.3-70-g09d2