diff options
| author | Michael Vogt <michael.vogt@ubuntu.com> | 2006-01-12 10:46:15 +0100 |
|---|---|---|
| committer | Michael Vogt <michael.vogt@ubuntu.com> | 2006-01-12 10:46:15 +0100 |
| commit | 65c30ff7d51224dd589ee426d79973d2c2f6bc35 (patch) | |
| tree | ec5b11ddb88b58af49293645c671962de655743b /DistUpgrade/DistUpgradeControler.py | |
| parent | 4e79e7a7b6c57b458bf97d6c5083989054a2ca75 (diff) | |
| download | python-apt-65c30ff7d51224dd589ee426d79973d2c2f6bc35.tar.gz | |
* fixes in the changes calculation code
Diffstat (limited to 'DistUpgrade/DistUpgradeControler.py')
| -rw-r--r-- | DistUpgrade/DistUpgradeControler.py | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/DistUpgrade/DistUpgradeControler.py b/DistUpgrade/DistUpgradeControler.py index 9888bf85..55040c55 100644 --- a/DistUpgrade/DistUpgradeControler.py +++ b/DistUpgrade/DistUpgradeControler.py @@ -73,8 +73,7 @@ class MyCache(apt.Cache): """ create a snapshot of the current changes """ self.to_install = [] self.to_remove = [] - for name in self.getChanges(): - pkg = self[name] + for pkg in self.getChanges(): if pkg.markedInstall or pkg.markedUpgrade: self.to_install.append(name) if pkg.markedDelete: @@ -396,9 +395,9 @@ class DistUpgradeControler(object): # that are not obsolete as well self.cache.create_snapshot() self.cache[pkgname].markDelete() - for change in self.cache.getChanges(): - if change not in remove_candidates or \ - change in self.foreign_pkgs: + for pkg in self.cache.getChanges(): + if pkg.name not in remove_candidates or \ + pkg.name in self.foreign_pkgs: self.cache.restore_snapshot() if self._view.confirmChanges(_("Remove obsolete Packages?"), self.cache.getChanges(), 0): |
