From e1a1eeefa2d7a681f6583b7520031fd71daad862 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Fri, 29 Sep 2006 21:37:18 +0200 Subject: * DistUpgrade/DistUpgradeCache.py: - added edgyQuirks handling for python transition --- DistUpgrade/DistUpgradeControler.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'DistUpgrade/DistUpgradeControler.py') diff --git a/DistUpgrade/DistUpgradeControler.py b/DistUpgrade/DistUpgradeControler.py index 7b255cf0..1d714325 100644 --- a/DistUpgrade/DistUpgradeControler.py +++ b/DistUpgrade/DistUpgradeControler.py @@ -644,7 +644,7 @@ class DistUpgradeControler(object): else: args.append("--without-network") os.execve(sys.argv[0],args, os.environ) - + # this is the core def edgyUpgrade(self): # sanity check (check for ubuntu-desktop, brokenCache etc) -- cgit v1.2.3 From 6a04c04bbe1639c732a250ab003d6e2b29bffc90 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Mon, 2 Oct 2006 14:52:56 +0200 Subject: * DistUpgrade/DistUpgradeControler.py: - fix more incorrect _() usage --- DistUpgrade/DistUpgradeControler.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'DistUpgrade/DistUpgradeControler.py') diff --git a/DistUpgrade/DistUpgradeControler.py b/DistUpgrade/DistUpgradeControler.py index 1d714325..52f4f785 100644 --- a/DistUpgrade/DistUpgradeControler.py +++ b/DistUpgrade/DistUpgradeControler.py @@ -75,7 +75,7 @@ class AptCdrom(object): _("There was a error adding the CD, the " "upgrade will abort. Please report this as " "a bug if this is a valid Ubuntu CD.\n\n" - "The error message was:\n'%s'" % e)) + "The error message was:\n'%s'") % e) return False logging.debug("AptCdrom.add() returned: %s" % res) return res @@ -613,7 +613,7 @@ class DistUpgradeControler(object): uri = match.group(1) + path apt_pkg.GetPkgAcqFile(fetcher, uri=uri, size=ver.Size, - descr=_("Fetching backport of '%s'" % pkgname)) + descr=_("Fetching backport of '%s'") % pkgname) res = fetcher.Run() if res != fetcher.ResultContinue: # ick! error ... -- cgit v1.2.3 From 2c928a9b6c3f88181ac34e3424ffdafabacee17f Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Mon, 2 Oct 2006 15:19:15 +0200 Subject: * DistUpgrade/DistUpgradeControler.py: - deal better with initial cache failures (e.g. because of broken sources.list) --- DistUpgrade/DistUpgradeControler.py | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'DistUpgrade/DistUpgradeControler.py') diff --git a/DistUpgrade/DistUpgradeControler.py b/DistUpgrade/DistUpgradeControler.py index 52f4f785..1f948d1f 100644 --- a/DistUpgrade/DistUpgradeControler.py +++ b/DistUpgrade/DistUpgradeControler.py @@ -142,7 +142,11 @@ class DistUpgradeControler(object): def prepare(self): """ initial cache opening, sanity checking, network checking """ - self.openCache() + try: + self.openCache() + except SystemError, e: + logging.error("openCache() failed: '%s'" % e) + return False if not self.cache.sanityCheck(self._view): return False # FIXME: we may try to find out a bit more about the network @@ -652,7 +656,14 @@ class DistUpgradeControler(object): self._view.setStep(1) if not self.prepare(): - self.abort(1) + self._view.error(_("Preparing the upgrade failed"), + _("Preparing the system for the upgrade " + "failed. Please report this as a bug " + "against the 'update-manager' " + "package and include the files in " + "/var/log/dist-upgrade/ " + "in the bugreport." )) + sys.exit(1) # mvo: commented out for now, see #54234, this needs to be # refactored to use a arch=any tarball -- cgit v1.2.3 From 6bc9ba7df538a541965d610490c19dd329496f53 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Wed, 4 Oct 2006 20:06:55 +0200 Subject: * DistUpgrade/DistUpgradeControler.py: - log free diskspace --- DistUpgrade/Changelog | 2 ++ DistUpgrade/DistUpgradeControler.py | 12 ++++++++++++ 2 files changed, 14 insertions(+) (limited to 'DistUpgrade/DistUpgradeControler.py') diff --git a/DistUpgrade/Changelog b/DistUpgrade/Changelog index 5f7ba584..bfd8d4bd 100644 --- a/DistUpgrade/Changelog +++ b/DistUpgrade/Changelog @@ -1,3 +1,5 @@ +2006-10-04: + - improve the space checking/logging 2006-09-29: - typo fix (thanks to Jane Silber) (lp: #62946) 2006-09-28: diff --git a/DistUpgrade/DistUpgradeControler.py b/DistUpgrade/DistUpgradeControler.py index 1f948d1f..7b35f3c8 100644 --- a/DistUpgrade/DistUpgradeControler.py +++ b/DistUpgrade/DistUpgradeControler.py @@ -372,6 +372,18 @@ class DistUpgradeControler(object): "packages of former installations using " "'sudo apt-get clean'.") + # gather/log some staticts + mnt_map = {} + for d in ["/","/usr","/var","/boot"]: + st = os.statvfs(d) + free = st[statvfs.F_BAVAIL]*st[statvfs.F_FRSIZE] + if st in mnt_map: + logging.debug("Dir %s mounted on %s" % (d,mnt_map[st])) + else: + logging.debug("Free space on %s: %s" % (d,free)) + mnt_map[st] = d + del mnt_map + # first check for /var (or where the archives are downloaded too) archivedir = apt_pkg.Config.FindDir("Dir::Cache::archives") st_archivedir = os.statvfs(archivedir) -- cgit v1.2.3