summaryrefslogtreecommitdiff
path: root/doc/examples
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2006-03-22 14:56:29 +0100
committerMichael Vogt <michael.vogt@ubuntu.com>2006-03-22 14:56:29 +0100
commite02913b6f336d4bf5bc2c17032c91ade974de04f (patch)
tree3c3689a9f8d69eb45140d10d60b9e1d2d6b025bf /doc/examples
parent4e7cf23803ea29eb90b9c663cb6ded845067a6c7 (diff)
downloadpython-apt-e02913b6f336d4bf5bc2c17032c91ade974de04f.tar.gz
* fixes for the pkgSrcRecords code
Diffstat (limited to 'doc/examples')
-rwxr-xr-xdoc/examples/build-deps.py2
-rw-r--r--doc/examples/sources.py6
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
+