diff options
| author | Michael Vogt <michael.vogt@ubuntu.com> | 2010-01-13 11:19:44 +0100 |
|---|---|---|
| committer | Michael Vogt <michael.vogt@ubuntu.com> | 2010-01-13 11:19:44 +0100 |
| commit | 8d4420aecf43b588e8485c71d8e2b0bd9371432d (patch) | |
| tree | cf97886eb6dd2c36cd55ade941987152d89094b9 /tests | |
| parent | 2e2aa5fc6e4ad31b52aaef236ed54a3b9ea59a5d (diff) | |
| download | python-apt-8d4420aecf43b588e8485c71d8e2b0bd9371432d.tar.gz | |
add "enhances" property
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/test_enhances.py | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/test_enhances.py b/tests/test_enhances.py new file mode 100644 index 00000000..3eced9f9 --- /dev/null +++ b/tests/test_enhances.py @@ -0,0 +1,17 @@ +#!/usr/bin/python + +import apt + +cache = apt.Cache() + +for pkg in cache: + if pkg.installed and pkg.installed.enhances: + s = "%s enhances:" % pkg.name + for or_list in pkg.installed.enhances: + for enhances in or_list.or_dependencies: + s += " %s" % enhances.name + if (cache.has_key(enhances.name) and + not cache[enhances.name].isInstalled): + s += "(*missing*) " + s += "," + print s[:-1] |
