summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2006-07-27 15:01:36 +0200
committerMichael Vogt <michael.vogt@ubuntu.com>2006-07-27 15:01:36 +0200
commitf97acdd802c0eb578cd730119d676fbdfabc4129 (patch)
tree1540769056c163122d85a734d17fa2c07bdd509d
parentaf398fcce8671bc864e4300c1b0bbeb07ab95aaf (diff)
parent6fc084d34105f336fdf090e2dd45e402e25cfc57 (diff)
downloadpython-apt-f97acdd802c0eb578cd730119d676fbdfabc4129.tar.gz
* merged the auto-mark branch
-rw-r--r--debian/changelog6
-rw-r--r--python/depcache.cc15
2 files changed, 18 insertions, 3 deletions
diff --git a/debian/changelog b/debian/changelog
index 467341a2..d720a91b 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,5 +1,4 @@
-=======
-python-apt (0.6.19) unstable; urgency=low
+python-apt (0.6.19ubuntu1) edgy; urgency=low
[ Michael Vogt ]
* doc/examples/print_uris.py:
@@ -7,6 +6,7 @@ python-apt (0.6.19) unstable; urgency=low
with binary packages
* python/apt_pkgmodule.cc:
- export sha256 generation
+ * added support for the pkgDepCache.IsGarbage() flag
[ Otavio Salvador ]
* apt/cache.py:
@@ -14,7 +14,7 @@ python-apt (0.6.19) unstable; urgency=low
- allow change of rootdir for APT database loading
- add dh_installexamples in package building Closes: #376014
- -- Michael Vogt <michael.vogt@ubuntu.com> Wed, 26 Jul 2006 18:51:56 +0200
+ -- Michael Vogt <michael.vogt@ubuntu.com> Thu, 27 Jul 2006 15:00:55 +0200
python-apt (0.6.18-0.2) unstable; urgency=low
diff --git a/python/depcache.cc b/python/depcache.cc
index e8140e2b..60bbc1a4 100644
--- a/python/depcache.cc
+++ b/python/depcache.cc
@@ -370,6 +370,20 @@ static PyObject *PkgDepCacheIsUpgradable(PyObject *Self,PyObject *Args)
return HandleErrors(Py_BuildValue("b",state.Upgradable()));
}
+static PyObject *PkgDepCacheIsGarbage(PyObject *Self,PyObject *Args)
+{
+ pkgDepCache *depcache = GetCpp<pkgDepCache *>(Self);
+
+ PyObject *PackageObj;
+ if (PyArg_ParseTuple(Args,"O!",&PackageType,&PackageObj) == 0)
+ return 0;
+
+ pkgCache::PkgIterator &Pkg = GetCpp<pkgCache::PkgIterator>(PackageObj);
+ pkgDepCache::StateCache &state = (*depcache)[Pkg];
+
+ return HandleErrors(Py_BuildValue("b",state.Garbage));
+}
+
static PyObject *PkgDepCacheIsNowBroken(PyObject *Self,PyObject *Args)
{
pkgDepCache *depcache = GetCpp<pkgDepCache *>(Self);
@@ -507,6 +521,7 @@ static PyMethodDef PkgDepCacheMethods[] =
{"IsUpgradable",PkgDepCacheIsUpgradable,METH_VARARGS,"Is pkg upgradable"},
{"IsNowBroken",PkgDepCacheIsNowBroken,METH_VARARGS,"Is pkg is now broken"},
{"IsInstBroken",PkgDepCacheIsInstBroken,METH_VARARGS,"Is pkg broken on the current install"},
+ {"IsGarbage",PkgDepCacheIsGarbage,METH_VARARGS,"Is pkg garbage (mark-n-sweep)"},
{"MarkedInstall",PkgDepCacheMarkedInstall,METH_VARARGS,"Is pkg marked for install"},
{"MarkedUpgrade",PkgDepCacheMarkedUpgrade,METH_VARARGS,"Is pkg marked for upgrade"},
{"MarkedDelete",PkgDepCacheMarkedDelete,METH_VARARGS,"Is pkg marked for delete"},