From a56d4330c45ea9dbb9dd8babb7e8f17ae79a6fdd Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Fri, 18 Nov 2005 11:23:10 +0000 Subject: * acquire interface works with progress reporting now --- doc/examples/acquire.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'doc') 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 -- cgit v1.2.3