From 0c5ef89b82b3a8a085f0b503b4a54be33d34e81c Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Mon, 12 Jan 2009 18:28:18 +0100 Subject: * apt/cache.py: Introduce isVirtualPackage() --- apt/cache.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'apt') diff --git a/apt/cache.py b/apt/cache.py index ff3149f5..0065d14c 100644 --- a/apt/cache.py +++ b/apt/cache.py @@ -202,6 +202,11 @@ class Cache(object): finally: os.close(lock) + def isVirtualPackage(self, pkgname): + """Return whether the package is a virtual package.""" + pkg = self._cache[pkgname] + return bool(pkg.ProvidesList and not pkg.VersionList) + def getProvidingPackages(self, virtual): """ Return a list of packages which provide the virtual package of the -- cgit v1.2.3