summaryrefslogtreecommitdiff
path: root/DistUpgrade
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2006-05-26 19:42:24 +0200
committerMichael Vogt <michael.vogt@ubuntu.com>2006-05-26 19:42:24 +0200
commit8788c87e087b01933030fd1fb8268ca0f3d7a523 (patch)
tree0a6d6f13473d07755be5ce848186b1f6cb41a347 /DistUpgrade
parent726df05e62500b4783151dc07ca2c66f340a1ce4 (diff)
downloadpython-apt-8788c87e087b01933030fd1fb8268ca0f3d7a523.tar.gz
* comment out breezy cdrom source to make demotions work
Diffstat (limited to 'DistUpgrade')
-rw-r--r--DistUpgrade/Changelog2
-rw-r--r--DistUpgrade/DistUpgradeControler.py20
2 files changed, 18 insertions, 4 deletions
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