summaryrefslogtreecommitdiff
path: root/apt/cache.py
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2009-09-03 15:56:15 +0200
committerMichael Vogt <michael.vogt@ubuntu.com>2009-09-03 15:56:15 +0200
commit153e0ff362dfe7e0dbd6bf045a4aa1225d12b743 (patch)
tree360971bf2da8db8cabed61af3c9ccac97617317f /apt/cache.py
parentbad4ccc67b4fb538498550ff48aef0e40bbb065c (diff)
parent7acb16fc4baa43cf2cbbc4de948973bdc099d878 (diff)
downloadpython-apt-153e0ff362dfe7e0dbd6bf045a4aa1225d12b743.tar.gz
* apt/cache.py:
- re-work the logic in commit() to fail if installArchives() returns a unexpected result * apt/progress/__init__.py: - catch exceptions in pm.DoInstall() * apt/package.py: - Export if a package is an essential one (Closes: #543428)
Diffstat (limited to 'apt/cache.py')
-rw-r--r--apt/cache.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/apt/cache.py b/apt/cache.py
index 828b167b..bb944041 100644
--- a/apt/cache.py
+++ b/apt/cache.py
@@ -314,8 +314,12 @@ class Cache(object):
res = self.installArchives(pm, installProgress)
if res == pm.ResultCompleted:
break
- if res == pm.ResultFailed:
+ elif res == pm.ResultFailed:
raise SystemError("installArchives() failed")
+ elif res == pm.ResultIncomplete:
+ pass
+ else:
+ raise SystemError("internal-error: unknown result code from InstallArchives: %s" % res)
# reload the fetcher for media swaping
fetcher.Shutdown()
return (res == pm.ResultCompleted)