summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2006-04-27 17:45:46 +0200
committerMichael Vogt <michael.vogt@ubuntu.com>2006-04-27 17:45:46 +0200
commitf54d5accf69032b8e94025781d91921a46b0af12 (patch)
tree6628555ad94c076f0199f25c092d43b178b578ac
parentcb2858d515080fdb894c81c4a561449db737e7c8 (diff)
downloadpython-apt-f54d5accf69032b8e94025781d91921a46b0af12.tar.gz
* more checking
-rw-r--r--DistUpgrade/Changelog5
-rw-r--r--DistUpgrade/DistUpgradeControler.py15
-rw-r--r--DistUpgrade/TODO2
3 files changed, 22 insertions, 0 deletions
diff --git a/DistUpgrade/Changelog b/DistUpgrade/Changelog
index d7885de9..748e4a62 100644
--- a/DistUpgrade/Changelog
+++ b/DistUpgrade/Changelog
@@ -1,3 +1,8 @@
+2006-04-27:
+ - add a additonal sanity check after the rewriting of the sources.list
+ (check for BaseMetaPkgs still in the cache)
+ - on abort reopen() the cache to force writing a new
+ /var/cache/apt/pkgcache.bin
2006-04-25:
- make sure that DistUpgradeView.getTerminal().call() actually
waits until the command has finished (dpkg --configure -a)
diff --git a/DistUpgrade/DistUpgradeControler.py b/DistUpgrade/DistUpgradeControler.py
index ced5d968..e88e96ee 100644
--- a/DistUpgrade/DistUpgradeControler.py
+++ b/DistUpgrade/DistUpgradeControler.py
@@ -111,6 +111,7 @@ class DistUpgradeControler(object):
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
# DONT'T ERROR, write a line with mirror here
@@ -303,6 +304,8 @@ class DistUpgradeControler(object):
def abort(self):
""" abort the upgrade, cleanup (as much as possible) """
self.sources.restoreBackup(self.sources_backup_ext)
+ # generate a new cache
+ self.openCache()
sys.exit(1)
@@ -333,6 +336,18 @@ class DistUpgradeControler(object):
# then update the package index files
if not self.doUpdate():
self.abort()
+ # now check if we still have some key packages after the update
+ # if not something went seriously wrong
+ for pkg in self.config.getlist("Distro","BaseMetaPkgs"):
+ if not self.cache.has_key(pkg):
+ logging.error("No '%s' after sources.list rewrite+update")
+ self._view.error(_("Inavlid package information"),
+ _("After your package information was "
+ "updated the essential package '%s' can "
+ "not be found anymore.\n"
+ "This indicates a serious error, please "
+ "report this as a bug.")
+ self.abort()
# then open the cache (again)
self._view.updateStatus(_("Checking package manager"))
diff --git a/DistUpgrade/TODO b/DistUpgrade/TODO
index d998a0c4..ec6a8c5a 100644
--- a/DistUpgrade/TODO
+++ b/DistUpgrade/TODO
@@ -19,6 +19,8 @@ MUSTFIX:
to universe (if the user has only main enabled this is considered
obsolete). It would also be nice inform about packages that went from
main->universe. We could ship a list of demotions.
+* [kamion]: we could use debconf-frontend=dialog and then detect the ansi
+ seqence that clear the screen and open the terminal then
breezy->dapper
--------------