summaryrefslogtreecommitdiff
path: root/DistUpgrade/DistUpgradeControler.py
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2006-08-30 10:48:11 +0200
committerMichael Vogt <michael.vogt@ubuntu.com>2006-08-30 10:48:11 +0200
commita84c8d3574e62d7cf6bed8df21733ff1a1f96c9d (patch)
treeb8aa31bcc0256ec6f96d09b6c1153c87edcdfef4 /DistUpgrade/DistUpgradeControler.py
parent1a864b488bd7444686698fdbd40c942e8f03afff (diff)
downloadpython-apt-a84c8d3574e62d7cf6bed8df21733ff1a1f96c9d.tar.gz
* DistUpgrade/DistUpgradeControler.py:
- change the obsoletes calculation when run without network and consider demotions as obsoletes then (because we can't really use the pkg.downloadable hint without network after the sources.list was rewritten
Diffstat (limited to 'DistUpgrade/DistUpgradeControler.py')
-rw-r--r--DistUpgrade/DistUpgradeControler.py11
1 files changed, 10 insertions, 1 deletions
diff --git a/DistUpgrade/DistUpgradeControler.py b/DistUpgrade/DistUpgradeControler.py
index cb0835fb..69d4cefe 100644
--- a/DistUpgrade/DistUpgradeControler.py
+++ b/DistUpgrade/DistUpgradeControler.py
@@ -487,7 +487,16 @@ class DistUpgradeControler(object):
# mark packages that are now obsolete (and where not obsolete
# before) to be deleted. make sure to not delete any foreign
# (that is, not from ubuntu) packages
- remove_candidates = now_obsolete - self.obsolete_pkgs
+ if self.useNetwork:
+ # we can only do the obsoletes calculation here if we use a
+ # network. otherwise after rewriting the sources.list everything
+ # that is not on the CD becomes obsolete (not-downloadable)
+ remove_candidates = now_obsolete - self.obsolete_pkgs
+ else:
+ # initial remove candidates when no network is used should
+ # be the demotions to make sure we don't leave potential
+ # unsupported software
+ remove_candidates = set(installed_demotions)
remove_candidates |= set(self.forced_obsoletes)
logging.debug("remove_candidates: '%s'" % remove_candidates)
logging.debug("Start checking for obsolete pkgs")