diff options
Diffstat (limited to 'DistUpgrade/DistUpgradeCache.py')
| -rw-r--r-- | DistUpgrade/DistUpgradeCache.py | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/DistUpgrade/DistUpgradeCache.py b/DistUpgrade/DistUpgradeCache.py index 2417a364..abe11d3b 100644 --- a/DistUpgrade/DistUpgradeCache.py +++ b/DistUpgrade/DistUpgradeCache.py @@ -109,6 +109,27 @@ class MyCache(apt.Cache): "this as a bug. ")) logging.debug("Dist-upgrade failed: '%s'", e) return False + + # check the trust of the packages that are going to change + untrusted = [] + for pkg in self.getChanges(): + if pkg.markedDelete: + continue + origins = pkg.candidateOrigin + trusted = False + for origin in origins: + trusted |= origin.trusted + if not trusted: + untrusted.append(pkg.name) + if len(untrusted) > 0: + # FIXME: maybe ask a question here? instead of failing? + view.error(_("Error authenticating some packages"), + _("It was not possible to authenticate some " + "packages. This may be a transient network problem. " + "You may want to try again later. See below for a " + "list of unauthenticated packages."), + "\n".join(untrusted)) + return False return True def _verifyChanges(self): |
