summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2008-02-18 17:17:13 +0100
committerMichael Vogt <michael.vogt@ubuntu.com>2008-02-18 17:17:13 +0100
commit1262330035d959037d37a80e9c9462776987f7c9 (patch)
treed9dfe81dbb81d3fe28582ad47f72887c362041ef /python
parent74ce5cc9af8b9ad0e62435864b28e3c4935a0db5 (diff)
parent1bf52388c98e72768b8f883726ee7e2e2992e4ff (diff)
downloadpython-apt-1262330035d959037d37a80e9c9462776987f7c9.tar.gz
* python/sourcelist.cc:
- support GetIndexes() GetAll argument to implement something like --print-uris * python/apt_pkgmodule.cc: - add InstState{Ok,ReInstReq,Hold,HoldReInstReq} constants * apt/cache.py: - add reqReinstallPkgs property that lists all packages in ReInstReq or HoldReInstReq
Diffstat (limited to 'python')
-rw-r--r--python/apt_pkgmodule.cc5
-rw-r--r--python/sourcelist.cc6
2 files changed, 8 insertions, 3 deletions
diff --git a/python/apt_pkgmodule.cc b/python/apt_pkgmodule.cc
index 15f7d238..ae1cf7be 100644
--- a/python/apt_pkgmodule.cc
+++ b/python/apt_pkgmodule.cc
@@ -507,6 +507,11 @@ extern "C" void initapt_pkg()
AddInt(Dict,"CurStateHalfInstalled",pkgCache::State::HalfInstalled);
AddInt(Dict,"CurStateConfigFiles",pkgCache::State::ConfigFiles);
AddInt(Dict,"CurStateInstalled",pkgCache::State::Installed);
+
+ AddInt(Dict,"InstStateOk",pkgCache::State::Ok);
+ AddInt(Dict,"InstStateReInstReq",pkgCache::State::ReInstReq);
+ AddInt(Dict,"InstStateHold",pkgCache::State::Hold);
+ AddInt(Dict,"InstStateHoldReInstReq",pkgCache::State::HoldReInstReq);
}
/*}}}*/
diff --git a/python/sourcelist.cc b/python/sourcelist.cc
index 68b764f8..76df015d 100644
--- a/python/sourcelist.cc
+++ b/python/sourcelist.cc
@@ -60,12 +60,12 @@ static PyObject *PkgSourceListGetIndexes(PyObject *Self,PyObject *Args)
pkgSourceList *list = GetCpp<pkgSourceList*>(Self);
PyObject *pyFetcher;
-
- if (PyArg_ParseTuple(Args, "O!",&PkgAcquireType,&pyFetcher) == 0)
+ char all = 0;
+ if (PyArg_ParseTuple(Args, "O!|b",&PkgAcquireType,&pyFetcher, &all) == 0)
return 0;
pkgAcquire *fetcher = GetCpp<pkgAcquire*>(pyFetcher);
- bool res = list->GetIndexes(fetcher);
+ bool res = list->GetIndexes(fetcher, all);
return HandleErrors(Py_BuildValue("b",res));
}