summaryrefslogtreecommitdiff
path: root/python/depcache.cc
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2005-07-01 21:44:17 +0000
committerMichael Vogt <michael.vogt@ubuntu.com>2005-07-01 21:44:17 +0000
commit2f8f815efac944fdaf1f0670f8322a229bf993ee (patch)
tree9b3f8eb62c28483127570f736dceace048ae92f9 /python/depcache.cc
parent38d978a82b10b18237fb55247c18cbc906cbd31b (diff)
downloadpython-apt-2f8f815efac944fdaf1f0670f8322a229bf993ee.tar.gz
* SetReInstall() added to depcache
Diffstat (limited to 'python/depcache.cc')
-rw-r--r--python/depcache.cc19
1 files changed, 19 insertions, 0 deletions
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"},