From 1db0459ae3a8a2240ffb9585bb1c378d7b17acbb Mon Sep 17 00:00:00 2001 From: Sebastian Heinlein Date: Thu, 21 Aug 2008 15:03:30 +0200 Subject: Add apt.Cache.clear() method (taken from GDebi), which re initializes the dependecy cache. --- apt/cache.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'apt/cache.py') 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 " -- cgit v1.2.3