diff options
| author | Michael Vogt <michael.vogt@ubuntu.com> | 2006-06-28 10:19:54 +0200 |
|---|---|---|
| committer | Michael Vogt <michael.vogt@ubuntu.com> | 2006-06-28 10:19:54 +0200 |
| commit | 8da0ea4e985d947ff176d2f5e5eada1f1d255a1e (patch) | |
| tree | ac7ed79bed4935267b86d8d4ba28452f66ba0617 | |
| parent | 4fb02d6b79ae8d284af0dfa0a70ac9436e491e31 (diff) | |
| download | python-apt-8da0ea4e985d947ff176d2f5e5eada1f1d255a1e.tar.gz | |
* speedups in the MyCache.clear() code
* minor code cleanups (move the depcache code into _initDepCcche())
| -rw-r--r-- | UpdateManager/UpdateManager.py | 19 | ||||
| -rw-r--r-- | debian/changelog | 7 |
2 files changed, 17 insertions, 9 deletions
diff --git a/UpdateManager/UpdateManager.py b/UpdateManager/UpdateManager.py index d4cc7a59..109e4d0c 100644 --- a/UpdateManager/UpdateManager.py +++ b/UpdateManager/UpdateManager.py @@ -83,11 +83,19 @@ CHANGELOGS_URI="http://changelogs.ubuntu.com/changelogs/pool/%s/%s/%s/%s_%s/chan class MyCache(apt.Cache): def __init__(self, progress): apt.Cache.__init__(self, progress) + self._initDepCache() assert self._depcache.BrokenCount == 0 and self._depcache.DelCount == 0 self.all_changes = {} + def _initDepCache(self): + #apt_pkg.Config.Set("Debug::pkgPolicy","1") + #self.depcache = apt_pkg.GetDepCache(self.cache) + #self._depcache = apt_pkg.GetDepCache(self._cache) + self._depcache.ReadPinFile() + if os.path.exists(SYNAPTIC_PINFILE): + self._depcache.ReadPinFile(SYNAPTIC_PINFILE) + self._depcache.Init() def clean(self): - for pkg in self: - pkg.markKeep() + self._initDepCache() def saveDistUpgrade(self): """ this functions mimics a upgrade but will never remove anything """ self._depcache.Upgrade(True) @@ -755,13 +763,6 @@ class UpdateManager(SimpleGladeApp): sys.exit(1) else: progress.hide() - #apt_pkg.Config.Set("Debug::pkgPolicy","1") - #self.depcache = apt_pkg.GetDepCache(self.cache) - self.cache._depcache.ReadPinFile() - if os.path.exists(SYNAPTIC_PINFILE): - self.cache._depcache.ReadPinFile(SYNAPTIC_PINFILE) - self.cache._depcache.Init() - def check_auto_update(self): # Check if automatic update is enabled. If not show a dialog to inform diff --git a/debian/changelog b/debian/changelog index 31679a80..200ee407 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +update-manager (0.43) edgy; urgency=low + + * fixes in the changelog reading code + * speedup in the cache clear code + + -- Michael Vogt <michael.vogt@ubuntu.com> Wed, 28 Jun 2006 10:17:48 +0200 + update-manager (0.42.2ubuntu22) dapper; urgency=low * UpdateManager/UpdateManager.py: |
