summaryrefslogtreecommitdiff
path: root/DistUpgrade
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
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')
-rw-r--r--DistUpgrade/Changelog3
-rw-r--r--DistUpgrade/DistUpgradeControler.py11
2 files changed, 13 insertions, 1 deletions
diff --git a/DistUpgrade/Changelog b/DistUpgrade/Changelog
index 421a4e42..b282caa1 100644
--- a/DistUpgrade/Changelog
+++ b/DistUpgrade/Changelog
@@ -4,6 +4,9 @@
- add --cdrom switch to make cdrom based dist-upgrades possible
- better error reporting
- moved the logging into the /var/log/dist-upgrade/ dir
+ - change the obsoletes calculation when run without network and
+ consider demotions as obsoletes then (because we can't really
+ use the "downloadable" hint without network)
2006-08-18:
- sort the demoted software list
2006-07-31:
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")