From fd43b1694f1382a3a47f5dc546ebe3d39fcd6e7d Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Mon, 20 Jan 2020 14:14:49 +0100 Subject: Implement short patterns (patterns starting with ~) Also make pattern detector in cacheset and private's list accept such patterns. We probably should just try to parse and see if it is a (start of a) pattern. --- apt-pkg/cacheset.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'apt-pkg/cacheset.cc') diff --git a/apt-pkg/cacheset.cc b/apt-pkg/cacheset.cc index f5251eda8..ae1d5ee3e 100644 --- a/apt-pkg/cacheset.cc +++ b/apt-pkg/cacheset.cc @@ -295,7 +295,7 @@ bool CacheSetHelper::PackageFromPackageName(PackageContainerInterface * const pc bool CacheSetHelper::PackageFromPattern(PackageContainerInterface *const pci, pkgCacheFile &Cache, std::string const &pattern) { - if (pattern.size() < 1 || pattern[0] != '?') + if (pattern.size() < 1 || (pattern[0] != '?' && pattern[0] != '~')) return false; auto compiledPattern = APT::CacheFilter::ParsePattern(pattern, &Cache); -- cgit v1.2.3