From af674d82d5cd36e22223ec49675d32adad07e0a9 Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Thu, 15 Aug 2019 13:36:04 +0200 Subject: 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. --- apt-pkg/cachefilter-patterns.cc | 2 ++ 1 file changed, 2 insertions(+) (limited to 'apt-pkg/cachefilter-patterns.cc') diff --git a/apt-pkg/cachefilter-patterns.cc b/apt-pkg/cachefilter-patterns.cc index ea35b9c46..f078924ff 100644 --- a/apt-pkg/cachefilter-patterns.cc +++ b/apt-pkg/cachefilter-patterns.cc @@ -218,6 +218,8 @@ std::unique_ptr PatternParser::aPattern(std::unique_p return std::make_unique(); if (node->matches("?essential", 0, 0)) return std::make_unique(); + if (node->matches("?exact-name", 1, 1)) + return std::make_unique(aWord(node->arguments[0])); if (node->matches("?false", 0, 0)) return std::make_unique(); if (node->matches("?garbage", 0, 0)) -- cgit v1.2.3-70-g09d2