diff options
author | Julian Andres Klode <julian.klode@canonical.com> | 2019-11-26 11:34:34 +0100 |
---|---|---|
committer | Julian Andres Klode <julian.klode@canonical.com> | 2019-11-26 11:34:34 +0100 |
commit | 6801e6d2c63d4ff087024fc84a0feb8aef86886b (patch) | |
tree | 2be0ce13c2500b4113c3ba721ec6cfaca3706287 /apt-pkg/cachefilter-patterns.h | |
parent | 02b0afd5098534eff34a8fa1d44454c7a3e1ff09 (diff) |
patterns: Add ?any-version
Diffstat (limited to 'apt-pkg/cachefilter-patterns.h')
-rw-r--r-- | apt-pkg/cachefilter-patterns.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/apt-pkg/cachefilter-patterns.h b/apt-pkg/cachefilter-patterns.h index 3d1735442..26b42d04b 100644 --- a/apt-pkg/cachefilter-patterns.h +++ b/apt-pkg/cachefilter-patterns.h @@ -260,6 +260,17 @@ struct VersionAnyMatcher : public Matcher } }; + +struct VersionIsAnyVersion : public VersionAnyMatcher +{ + std::unique_ptr<APT::CacheFilter::Matcher> base; + VersionIsAnyVersion(std::unique_ptr<APT::CacheFilter::Matcher> base) : base(std::move(base)) {} + bool operator()(pkgCache::VerIterator const &Ver) override + { + return (*base)(Ver); + } +}; + struct VersionIsArchive : public VersionAnyMatcher { BaseRegexMatcher matcher; |