summaryrefslogtreecommitdiff
path: root/DistUpgrade/DistUpgradeControler.py
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2006-04-18 12:55:03 +0200
committerMichael Vogt <michael.vogt@ubuntu.com>2006-04-18 12:55:03 +0200
commit4514e8883fc10cb6e8b29fe78ede8bef41858a59 (patch)
treeef7f04a2714fdf88656036f7fcf26458dfa43678 /DistUpgrade/DistUpgradeControler.py
parenta34c35a2528041e658e541692adaa8b542a2e086 (diff)
downloadpython-apt-4514e8883fc10cb6e8b29fe78ede8bef41858a59.tar.gz
* improved logging
* DistUpgrade/Changelog: added
Diffstat (limited to 'DistUpgrade/DistUpgradeControler.py')
-rw-r--r--DistUpgrade/DistUpgradeControler.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/DistUpgrade/DistUpgradeControler.py b/DistUpgrade/DistUpgradeControler.py
index 17ba46ee..d0fde352 100644
--- a/DistUpgrade/DistUpgradeControler.py
+++ b/DistUpgrade/DistUpgradeControler.py
@@ -59,6 +59,8 @@ class DistUpgradeControler(object):
def updateSourcesList(self):
+ logging.debug("updateSourcesList()")
+
# this must map, i.e. second in "from" must be the second in "to"
# (but they can be different, so in theory we could exchange
# component names here)
@@ -79,6 +81,10 @@ class DistUpgradeControler(object):
# look over the stuff we have
foundToDist = False
for entry in self.sources:
+ # ignore invalid records (but update disabled ones)
+ if entry.invalid:
+ continue
+ logging.debug("examining: '%s'" % entry)
# check if it's a mirror (or offical site)
validMirror = False
for mirror in valid_mirrors:
@@ -87,22 +93,27 @@ class DistUpgradeControler(object):
if entry.dist in toDists:
# so the self.sources.list is already set to the new
# distro
+ logging.debug("entry '%s' is already set to new dist" % entry)
foundToDist = True
elif entry.dist in fromDists:
foundToDist = True
entry.dist = toDists[fromDists.index(entry.dist)]
+ logging.debug("entry '%s' updated to new dist" % entry)
else:
# disable all entries that are official but don't
# point to the "from" dist
entry.disabled = True
+ logging.debug("entry '%s' was disabled (unknown dist)" % entry)
# it can only be one valid mirror, so we can break here
break
# disable anything that is not from a official mirror
if not validMirror:
entry.disabled = True
+ logging.debug("entry '%s' was disabled (unknown mirror)" % entry)
if not foundToDist:
# FIXME: offer to write a new self.sources.list entry
+ logging.error("No valid entry found")
return self._view.error(_("No valid entry found"),
_("While scaning your repository "
"information no valid entry for "
@@ -121,6 +132,7 @@ class DistUpgradeControler(object):
sourceslist = apt_pkg.GetPkgSourceList()
sourceslist.ReadMainList()
except SystemError:
+ logging.error("Repository information invalid after updating (we broke it!)")
self._view.error(_("Repository information invalid"),
_("Upgrading the repository information "
"resulted in a invalid file. Please "