diff options
| author | Julian Andres Klode <jak@debian.org> | 2009-01-12 18:28:18 +0100 |
|---|---|---|
| committer | Julian Andres Klode <jak@debian.org> | 2009-01-12 18:28:18 +0100 |
| commit | 0c5ef89b82b3a8a085f0b503b4a54be33d34e81c (patch) | |
| tree | 6ddc77af4ad79a2ce7e86e439402fb500bb70476 /apt/cache.py | |
| parent | c48741a79cc4581ffb3890ceeef1420c0ccab830 (diff) | |
| download | python-apt-0c5ef89b82b3a8a085f0b503b4a54be33d34e81c.tar.gz | |
* apt/cache.py: Introduce isVirtualPackage()
Diffstat (limited to 'apt/cache.py')
| -rw-r--r-- | apt/cache.py | 5 |
1 files changed, 5 insertions, 0 deletions
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 |
