From 2f8f815efac944fdaf1f0670f8322a229bf993ee Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Fri, 1 Jul 2005 21:44:17 +0000 Subject: * SetReInstall() added to depcache --- python/depcache.cc | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'python') 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(Self); + + PyObject *PackageObj; + char value = 0; + if (PyArg_ParseTuple(Args,"O!b",&PackageType,&PackageObj, &value) == 0) + return 0; + + pkgCache::PkgIterator &Pkg = GetCpp(PackageObj); + depcache->SetReInstall(Pkg,value); + + Py_INCREF(Py_None); + return HandleErrors(Py_None); +} + + static PyObject *PkgDepCacheMarkDelete(PyObject *Self,PyObject *Args) { pkgDepCache *depcache = GetCpp(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(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"}, -- cgit v1.2.3