diff options
| -rw-r--r-- | apt/package.py | 5 | ||||
| -rw-r--r-- | debian/changelog | 8 | ||||
| -rw-r--r-- | python/depcache.cc | 6 |
3 files changed, 15 insertions, 4 deletions
diff --git a/apt/package.py b/apt/package.py index 0c451e4e..af5dd327 100644 --- a/apt/package.py +++ b/apt/package.py @@ -300,12 +300,13 @@ class Package(object): Fix.InstallProtect() Fix.Resolve() self._pcache.cachePostChange() - def markInstall(self, autoFix=True, autoInst=True): + def markInstall(self, autoFix=True, autoInst=True, fromUser=True): """ mark a package for install. Run the resolver if autoFix is set, automatically install required dependencies if autoInst is set + record it as automatically installed when fromuser is set to false """ self._pcache.cachePreChange() - self._depcache.MarkInstall(self._pkg, autoInst) + self._depcache.MarkInstall(self._pkg, autoInst, fromUser) # try to fix broken stuff if autoFix and self._depcache.BrokenCount > 0: fixer = apt_pkg.GetPkgProblemResolver(self._depcache) diff --git a/debian/changelog b/debian/changelog index f8a859e4..ffceba45 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,11 @@ +python-apt (0.6.20ubuntu2) feisty; urgency=low + + * python/depcache.cc: + - MarkInstall() has new FromUser argument to support marking + packages as automatically installed + + -- Michael Vogt <michael.vogt@ubuntu.com> Fri, 26 Jan 2007 16:39:10 +0100 + python-apt (0.6.20ubuntu1) feisty; urgency=low * merged from debian diff --git a/python/depcache.cc b/python/depcache.cc index 159a7103..71e6a2e6 100644 --- a/python/depcache.cc +++ b/python/depcache.cc @@ -346,11 +346,13 @@ static PyObject *PkgDepCacheMarkInstall(PyObject *Self,PyObject *Args) PyObject *PackageObj; char autoInst=1; - if (PyArg_ParseTuple(Args,"O!|b",&PackageType,&PackageObj, &autoInst) == 0) + char fromUser=1; + if (PyArg_ParseTuple(Args,"O!|bb",&PackageType,&PackageObj, + &autoInst, &fromUser) == 0) return 0; pkgCache::PkgIterator &Pkg = GetCpp<pkgCache::PkgIterator>(PackageObj); - depcache->MarkInstall(Pkg, autoInst); + depcache->MarkInstall(Pkg, autoInst, 0, fromUser); Py_INCREF(Py_None); return HandleErrors(Py_None); |
