diff options
author | Julian Andres Klode <julian.klode@canonical.com> | 2019-08-21 22:21:30 +0200 |
---|---|---|
committer | Julian Andres Klode <julian.klode@canonical.com> | 2019-11-25 11:32:19 +0100 |
commit | 7fa292edbe924923cc689721fe58244ca0a40bcd (patch) | |
tree | fad811887e13057885056900431bdce9de62e487 /apt-pkg/cachefilter-patterns.cc | |
parent | 8428114608627fe0a08dcf1589931f6db025f0b4 (diff) |
patterns: Add ?source-name and ?source-version
Diffstat (limited to 'apt-pkg/cachefilter-patterns.cc')
-rw-r--r-- | apt-pkg/cachefilter-patterns.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/apt-pkg/cachefilter-patterns.cc b/apt-pkg/cachefilter-patterns.cc index ba341df60..4414792cf 100644 --- a/apt-pkg/cachefilter-patterns.cc +++ b/apt-pkg/cachefilter-patterns.cc @@ -236,6 +236,10 @@ std::unique_ptr<APT::CacheFilter::Matcher> PatternParser::aPattern(std::unique_p return std::make_unique<APT::CacheFilter::NOTMatcher>(aPattern(node->arguments[0]).release()); if (node->matches("?obsolete", 0, 0)) return std::make_unique<Patterns::PackageIsObsolete>(); + if (node->matches("?source-package", 1, 1)) + return std::make_unique<Patterns::VersionIsSourcePackage>(aWord(node->arguments[0])); + if (node->matches("?source-version", 1, 1)) + return std::make_unique<Patterns::VersionIsSourceVersion>(aWord(node->arguments[0])); if (node->matches("?true", 0, 0)) return std::make_unique<APT::CacheFilter::TrueMatcher>(); if (node->matches("?upgradable", 0, 0)) |