summaryrefslogtreecommitdiff
path: root/apt-pkg/cachefilter-patterns.h
diff options
context:
space:
mode:
authorJulian Andres Klode <julian.klode@canonical.com>2024-02-13 12:29:28 +0100
committerJulian Andres Klode <julian.klode@canonical.com>2024-02-13 14:28:06 +0100
commit422e68f569f374f697b84332f7e68c6fe5f7389f (patch)
tree994ce575bfbc628afbfe16625dec77cf6248a481 /apt-pkg/cachefilter-patterns.h
parenta8352c2859a6f84b36fa5cd0af89231cb656b1ce (diff)
Add a new ?phasing pattern
This selects all packages that are being kept back due to phasing on your system.
Diffstat (limited to 'apt-pkg/cachefilter-patterns.h')
-rw-r--r--apt-pkg/cachefilter-patterns.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/apt-pkg/cachefilter-patterns.h b/apt-pkg/cachefilter-patterns.h
index 2d48a1cc9..5fc00377f 100644
--- a/apt-pkg/cachefilter-patterns.h
+++ b/apt-pkg/cachefilter-patterns.h
@@ -243,6 +243,16 @@ struct APT_HIDDEN PackageIsObsolete : public PackageMatcher
}
};
+struct APT_HIDDEN PackageIsPhasing : public PackageMatcher
+{
+ pkgCacheFile *Cache;
+ explicit PackageIsPhasing(pkgCacheFile *Cache) : Cache(Cache) {}
+ bool operator()(pkgCache::PkgIterator const &pkg) override
+ {
+ return (*Cache)->PhasingApplied(pkg);
+ }
+};
+
struct APT_HIDDEN PackageIsUpgradable : public PackageMatcher
{
pkgCacheFile *Cache;