diff options
Diffstat (limited to 'doc')
| -rw-r--r-- | doc/examples/acquire.py | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/doc/examples/acquire.py b/doc/examples/acquire.py index 12727232..98b70ab0 100644 --- a/doc/examples/acquire.py +++ b/doc/examples/acquire.py @@ -1,4 +1,6 @@ +import apt import apt_pkg +import os apt_pkg.init() @@ -9,10 +11,16 @@ recs = apt_pkg.GetPkgRecords(cache) list = apt_pkg.GetPkgSourceList() list.ReadMainList() +os.mkdir("/tmp/pyapt-test") +os.mkdir("/tmp/pyapt-test/partial") +apt_pkg.Config.Set("Dir::Cache::archives","/tmp/pyapt-test") + pkg = cache["3ddesktop"] depcache.MarkInstall(pkg) -fetcher = apt_pkg.GetAcquire() +progress = apt.progress.TextFetchProgress() +fetcher = apt_pkg.GetAcquire(progress) +#fetcher = apt_pkg.GetAcquire() pm = apt_pkg.GetPackageManager(depcache) print pm |
