summaryrefslogtreecommitdiff
path: root/DistUpgrade
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2006-01-18 14:19:41 +0100
committerMichael Vogt <michael.vogt@ubuntu.com>2006-01-18 14:19:41 +0100
commit2c89e6425f7a26365333de615abc920dc28d4fb8 (patch)
tree3615a6a96c5e49d24ccd37d77a6396faac609150 /DistUpgrade
parentaea7fc20a2b038b5daf776be1edea9454551ad82 (diff)
downloadpython-apt-2c89e6425f7a26365333de615abc920dc28d4fb8.tar.gz
* make not upgrading the installed meta-packages fatal as well
Diffstat (limited to 'DistUpgrade')
-rw-r--r--DistUpgrade/DistUpgradeCache.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/DistUpgrade/DistUpgradeCache.py b/DistUpgrade/DistUpgradeCache.py
index c45407dc..3c7773cb 100644
--- a/DistUpgrade/DistUpgradeCache.py
+++ b/DistUpgrade/DistUpgradeCache.py
@@ -97,7 +97,8 @@ class MyCache(apt.Cache):
try:
# upgrade (and make sure this way that the cache is ok)
self.upgrade(True)
- self._installMetaPkgs(view)
+ if not self._installMetaPkgs(view):
+ raise SystemError, _("Can't upgrade required meta-packages")
if not self._verifyChanges():
raise SystemError, _("A essential package would have to be removed")
except SystemError, e:
@@ -145,10 +146,10 @@ class MyCache(apt.Cache):
# install (that result in a upgrade and removes a markDelete)
for key in metapkgs:
try:
- if self[key].isInstalled: self[key].markInstall()
+ if self[key].isInstalled: self[key].markUpgrade()
except SystemError, e:
- logging.debug("Can't mark '%s' for install" % key)
-
+ logging.debug("Can't mark '%s' for upgrade" % key)
+ return False
# check if we have a meta-pkg, if not, try to guess which one to pick
if not metaPkgInstalled():
logging.debug("no {ubuntu,edubuntu,kubuntu}-desktop pkg installed")