Project

General

Profile

update-manager-downloader-fix2.diff

Mikko Ruohola, 05/30/2012 09:26 AM

View differences:

UpdateManager/Core/DistUpgradeFetcherCore.py 2011-11-01 13:22:16 +0000
68 68
            f = self.tmpdir+"/"+os.path.basename(self.new_dist.upgradeTool)
69 69
            sig = self.tmpdir+"/"+os.path.basename(self.new_dist.upgradeToolSig)
70 70
            print "authenticate '%s' against '%s' " % (os.path.basename(f),os.path.basename(sig))
71
            if not self.gpgauthenticate(f, sig):
72
                return False
73

  
74
        # we may return False here by default if we want to make a sig
75
        # mandatory
76
        return True
71
            if self.gpgauthenticate(f, sig):
72
                return True
73
        return False
77 74

  
78 75
    def gpgauthenticate(self, file, signature,
79 76
                        keyring='/etc/apt/trusted.gpg'):
......
249 246
                  _("Fetching the upgrade failed. There may be a network "
250 247
                    "problem. "))
251 248
            return
249
        if not self.authenticate():
250
            self.error(_("Authentication failed"),
251
                  _("Authenticating the upgrade failed. There may be a problem "
252
                    "with the network or with the server. "))
253
            self.cleanup()
254
            return
252 255
        if not self.extractDistUpgrader():
253 256
            self.error(_("Failed to extract"),
254 257
                  _("Extracting the upgrade failed. There may be a problem "
......
261 264
                    "with the network or with the server. "))
262 265
            self.cleanup()
263 266
            return
264
        if not self.authenticate():
265
            self.error(_("Authentication failed"),
266
                  _("Authenticating the upgrade failed. There may be a problem "
267
                    "with the network or with the server. "))
268
            self.cleanup()
269
            return
270 267
        try:
271 268
            # check if we can execute, if we run it via sudo we will
272 269
            # not know otherwise, sudo/gksu will not raise a exception
Go to top