From e02913b6f336d4bf5bc2c17032c91ade974de04f Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Wed, 22 Mar 2006 14:56:29 +0100 Subject: * fixes for the pkgSrcRecords code --- doc/examples/build-deps.py | 2 +- doc/examples/sources.py | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) (limited to 'doc/examples') diff --git a/doc/examples/build-deps.py b/doc/examples/build-deps.py index b580f5de..65e35f3d 100755 --- a/doc/examples/build-deps.py +++ b/doc/examples/build-deps.py @@ -24,7 +24,7 @@ cache = apt_pkg.GetCache() depcache = apt_pkg.GetDepCache(cache) depcache.Init() records = apt_pkg.GetPkgRecords(cache) -srcrecords = apt_pkg.GetPkgSrcRecords(cache) +srcrecords = apt_pkg.GetPkgSrcRecords() # base package that we use for build-depends calculation if len(sys.argv) < 2: diff --git a/doc/examples/sources.py b/doc/examples/sources.py index 79514621..0a90bae9 100644 --- a/doc/examples/sources.py +++ b/doc/examples/sources.py @@ -4,6 +4,12 @@ import apt_pkg apt_pkg.init() +#cache = apt_pkg.GetCache() +#sources = apt_pkg.GetPkgSrcRecords(cache) + sources = apt_pkg.GetPkgSrcRecords() +sources.Restart() while sources.Lookup('hello'): print sources.Package, sources.Version, sources.Maintainer, sources.Section, `sources.Binaries` + #print sources.Files + -- cgit v1.2.3