diff options
| author | Michael Vogt <michael.vogt@ubuntu.com> | 2005-07-01 21:44:17 +0000 |
|---|---|---|
| committer | Michael Vogt <michael.vogt@ubuntu.com> | 2005-07-01 21:44:17 +0000 |
| commit | 2f8f815efac944fdaf1f0670f8322a229bf993ee (patch) | |
| tree | 9b3f8eb62c28483127570f736dceace048ae92f9 | |
| parent | 38d978a82b10b18237fb55247c18cbc906cbd31b (diff) | |
| download | python-apt-2f8f815efac944fdaf1f0670f8322a229bf993ee.tar.gz | |
* SetReInstall() added to depcache
| -rw-r--r-- | debian/changelog | 2 | ||||
| -rw-r--r-- | python/depcache.cc | 19 |
2 files changed, 20 insertions, 1 deletions
diff --git a/debian/changelog b/debian/changelog index b6f07320..c46b89fd 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -python-apt (0.6.13) breezy; urgency=low +python-apt (0.6.12ubuntu1mvo1) breezy; urgency=low * support for Marked{Downgrade,Reinstall} added * Cache.GetChanges() added diff --git a/python/depcache.cc b/python/depcache.cc index 49049c4b..2d7161a3 100644 --- a/python/depcache.cc +++ b/python/depcache.cc @@ -294,6 +294,23 @@ static PyObject *PkgDepCacheMarkKeep(PyObject *Self,PyObject *Args) return HandleErrors(Py_None); } +static PyObject *PkgDepCacheSetReInstall(PyObject *Self,PyObject *Args) +{ + pkgDepCache *depcache = GetCpp<pkgDepCache*>(Self); + + PyObject *PackageObj; + char value = 0; + if (PyArg_ParseTuple(Args,"O!b",&PackageType,&PackageObj, &value) == 0) + return 0; + + pkgCache::PkgIterator &Pkg = GetCpp<pkgCache::PkgIterator>(PackageObj); + depcache->SetReInstall(Pkg,value); + + Py_INCREF(Py_None); + return HandleErrors(Py_None); +} + + static PyObject *PkgDepCacheMarkDelete(PyObject *Self,PyObject *Args) { pkgDepCache *depcache = GetCpp<pkgDepCache *>(Self); @@ -310,6 +327,7 @@ static PyObject *PkgDepCacheMarkDelete(PyObject *Self,PyObject *Args) return HandleErrors(Py_None); } + static PyObject *PkgDepCacheMarkInstall(PyObject *Self,PyObject *Args) { pkgDepCache *depcache = GetCpp<pkgDepCache *>(Self); @@ -470,6 +488,7 @@ static PyMethodDef PkgDepCacheMethods[] = {"MarkKeep",PkgDepCacheMarkKeep,METH_VARARGS,"Mark package for keep"}, {"MarkDelete",PkgDepCacheMarkDelete,METH_VARARGS,"Mark package for delete (optional boolean argument if it should be purged)"}, {"MarkInstall",PkgDepCacheMarkInstall,METH_VARARGS,"Mark package for Install"}, + {"SetReInstall",PkgDepCacheSetReInstall,METH_VARARGS,"Set if the package should be reinstalled"}, // state information {"IsUpgradable",PkgDepCacheIsUpgradable,METH_VARARGS,"Is pkg upgradable"}, {"IsNowBroken",PkgDepCacheIsNowBroken,METH_VARARGS,"Is pkg is now broken"}, |
