From 8788c87e087b01933030fd1fb8268ca0f3d7a523 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Fri, 26 May 2006 19:42:24 +0200 Subject: * comment out breezy cdrom source to make demotions work --- DistUpgrade/Changelog | 2 ++ DistUpgrade/DistUpgradeControler.py | 20 ++++++++++++++++---- 2 files changed, 18 insertions(+), 4 deletions(-) (limited to 'DistUpgrade') diff --git a/DistUpgrade/Changelog b/DistUpgrade/Changelog index 1f223398..7ea849c1 100644 --- a/DistUpgrade/Changelog +++ b/DistUpgrade/Changelog @@ -5,6 +5,8 @@ - fix a bug in the sourcesList rewriting (ubuntu: #46245) - expand the terminal when no libgnome2-perl is installed because debconf might want to ask questions (ubuntu: #46214) + - disable the breezy cdrom source to make removal of demoted + packages work properly (ubuntu: #46336) 2006-05-12: - space checking improved (ubuntu: #43948) - show software that was demoted from main -> universe diff --git a/DistUpgrade/DistUpgradeControler.py b/DistUpgrade/DistUpgradeControler.py index 0499d37b..d5aa8a7d 100644 --- a/DistUpgrade/DistUpgradeControler.py +++ b/DistUpgrade/DistUpgradeControler.py @@ -89,10 +89,20 @@ class DistUpgradeControler(object): # look over the stuff we have foundToDist = False for entry in self.sources: - # ignore invalid records (but update disabled ones) - # or cdrom entries - if entry.invalid or entry.uri.startswith("cdrom:") or entry.disabled: + + # ignore invalid records or disabled ones + if entry.invalid or entry.disabled: + continue + + # we disable breezy cdrom sources to make sure that demoted + # packages are removed + if entry.uri.startswith("cdrom:") and entry.dist == "breezy": + entry.disabled = True + continue + # ignore cdrom sources otherwise + elif entry.uri.startwith("cdrom:"): continue + logging.debug("examining: '%s'" % entry) # check if it's a mirror (or offical site) validMirror = False @@ -372,6 +382,8 @@ class DistUpgradeControler(object): open(demotions_file).readlines())) installed_demotions = filter(lambda pkg: pkg.isInstalled and pkg.name in demotions, self.cache) if len(installed_demotions) > 0: + demoted = [pkg.name for pkg in installed_demotions] + logging.debug("demoted: '%s'" % " ".join(demoted)) self._view.information(_("Some software no longer officially " "supported"), _("These installed packages are " @@ -381,7 +393,7 @@ class DistUpgradeControler(object): "If you don't have 'universe' enabled " "these packages will be suggested for " "removal in the next step. "), - "\n".join([pkg.name for pkg in installed_demotions])) + "\n".join(demoted)) # mark packages that are now obsolete (and where not obsolete # before) to be deleted. make sure to not delete any foreign -- cgit v1.2.3