diff options
Diffstat (limited to 'doc')
| -rw-r--r-- | doc/examples/depcache.py | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/doc/examples/depcache.py b/doc/examples/depcache.py new file mode 100644 index 00000000..17dbf147 --- /dev/null +++ b/doc/examples/depcache.py @@ -0,0 +1,19 @@ +#!/usr/bin/python +# example how to deal with the depcache + +import apt_pkg + +apt_pkg.init() +cache = apt_pkg.GetCache() +print cache.PackageCount + +iter = cache["base-config"] +print iter + +depcache = apt_pkg.GetDepCache(cache) +depcache.Init() +print depcache +print depcache.InstCount + +ver= depcache.GetCandidateVer(iter) +print ver |
