summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2006-03-22 15:23:18 +0100
committerMichael Vogt <michael.vogt@ubuntu.com>2006-03-22 15:23:18 +0100
commit4399788cb0202968a7fe5098050cec8a851bd58f (patch)
tree6ce5a2918de12b1a0518d593c1438372e341d5ce
parenteef094d6218739bc0147910bfdd478ac10f18ec1 (diff)
downloadpython-apt-4399788cb0202968a7fe5098050cec8a851bd58f.tar.gz
* add PkgSrcRecords.Index to the code
-rw-r--r--doc/examples/sources.py2
-rw-r--r--python/pkgsrcrecords.cc4
2 files changed, 4 insertions, 2 deletions
diff --git a/doc/examples/sources.py b/doc/examples/sources.py
index 0a90bae9..78913523 100644
--- a/doc/examples/sources.py
+++ b/doc/examples/sources.py
@@ -12,4 +12,4 @@ sources.Restart()
while sources.Lookup('hello'):
print sources.Package, sources.Version, sources.Maintainer, sources.Section, `sources.Binaries`
#print sources.Files
-
+ print sources.Index.ArchiveURI("")
diff --git a/python/pkgsrcrecords.cc b/python/pkgsrcrecords.cc
index abb29c74..5e04f5fc 100644
--- a/python/pkgsrcrecords.cc
+++ b/python/pkgsrcrecords.cc
@@ -96,8 +96,10 @@ static PyObject *PkgSrcRecordsAttr(PyObject *Self,char *Name)
*b != 0;
++b)
PyList_Append(List, CppPyString(*b));
-
return List; // todo
+ } else if (strcmp("Index",Name) == 0) {
+ const pkgIndexFile &tmp = Struct.Last->Index();
+ return CppOwnedPyObject_NEW<pkgIndexFile*>(Self,&PackageIndexFileType, (pkgIndexFile*)&tmp);
} else if (strcmp("Files",Name) == 0) {
PyObject *List = PyList_New(0);