diff options
| author | Michael Vogt <michael.vogt@ubuntu.com> | 2006-03-22 14:56:29 +0100 |
|---|---|---|
| committer | Michael Vogt <michael.vogt@ubuntu.com> | 2006-03-22 14:56:29 +0100 |
| commit | e02913b6f336d4bf5bc2c17032c91ade974de04f (patch) | |
| tree | 3c3689a9f8d69eb45140d10d60b9e1d2d6b025bf /doc/examples | |
| parent | 4e7cf23803ea29eb90b9c663cb6ded845067a6c7 (diff) | |
| download | python-apt-e02913b6f336d4bf5bc2c17032c91ade974de04f.tar.gz | |
* fixes for the pkgSrcRecords code
Diffstat (limited to 'doc/examples')
| -rwxr-xr-x | doc/examples/build-deps.py | 2 | ||||
| -rw-r--r-- | doc/examples/sources.py | 6 |
2 files changed, 7 insertions, 1 deletions
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 + |
