summaryrefslogtreecommitdiff
path: root/apt/cache.py
diff options
context:
space:
mode:
authorSebastian Heinlein <sebi@glatzor.de>2008-08-21 15:03:30 +0200
committerSebastian Heinlein <sebi@glatzor.de>2008-08-21 15:03:30 +0200
commit1db0459ae3a8a2240ffb9585bb1c378d7b17acbb (patch)
tree41b5208c1827b5b8110c6740d331dc665a104013 /apt/cache.py
parent1c521e44441ae442edea8b9a8431273ae530daea (diff)
downloadpython-apt-1db0459ae3a8a2240ffb9585bb1c378d7b17acbb.tar.gz
Add apt.Cache.clear() method (taken from GDebi), which re initializes the
dependecy cache.
Diffstat (limited to 'apt/cache.py')
-rw-r--r--apt/cache.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/apt/cache.py b/apt/cache.py
index bbf2165b..3df2b4a6 100644
--- a/apt/cache.py
+++ b/apt/cache.py
@@ -232,6 +232,10 @@ class Cache(object):
fetcher.Shutdown()
return (res == pm.ResultCompleted)
+ def clear(self):
+ """ Unmark all changes """
+ self._depcache.Init()
+
# cache changes
def cachePostChange(self):
" called internally if the cache has changed, emit a signal then "