diff options
| author | Michael Vogt <michael.vogt@ubuntu.com> | 2006-04-04 15:31:55 +0200 |
|---|---|---|
| committer | Michael Vogt <michael.vogt@ubuntu.com> | 2006-04-04 15:31:55 +0200 |
| commit | 5f87a4cb3ff6f83519dd2680879e921a58a4b16c (patch) | |
| tree | 953e85e3341ec54736601c8c7c019bcec53065f0 /UpdateManager | |
| parent | 0813eea814baa4f041d3cac07a4a7070cd61cd7c (diff) | |
| download | python-apt-5f87a4cb3ff6f83519dd2680879e921a58a4b16c.tar.gz | |
* fix the authentication
Diffstat (limited to 'UpdateManager')
| -rw-r--r-- | UpdateManager/DistUpgradeFetcher.py | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/UpdateManager/DistUpgradeFetcher.py b/UpdateManager/DistUpgradeFetcher.py index 54823795..aa51066a 100644 --- a/UpdateManager/DistUpgradeFetcher.py +++ b/UpdateManager/DistUpgradeFetcher.py @@ -104,12 +104,16 @@ class DistUpgradeFetcher(object): # mandatory return True - def gpgauthenticate(self, file, signature, keyring='/etc/apt/trusted.gpg'): + def gpgauthenticate(self, file, signature, + keyring='/etc/apt/trusted.gpg', + trustdb='/etc/apt/trustdb.gpg'): """ authenticated a file against a given signature, if no keyring is given use the apt default keyring """ gpg = GnuPGInterface.GnuPG() - gpg.options.extra_args = ['--no-default-keyring', + gpg.options.extra_args = ['--no-options', + '--no-default-keyring', + '--trustdb-name',trustdb, '--keyring', keyring] proc = gpg.run(['--verify', signature, file], create_fhs=['status','logger','stderr']) @@ -118,7 +122,7 @@ class DistUpgradeFetcher(object): proc.wait() except IOError,e: # gnupg returned a problem (non-zero exit) - print "exception from gpg: %s", e + print "exception from gpg: %s" % e return False if "VALIDSIG" in gpgres: return True |
