Bug#627063: python-debian: GpgInfo.from_sequence has an arbitrary check on keyrings

Julien Cristau jcristau at debian.org
Tue May 17 12:14:13 UTC 2011


Package: python-debian
Version: 0.1.18
Severity: normal

debian.deb822.GpgInfo.from_sequence takes a list of keyrings, and then
checks if the given files exist.  However gpg and gpgv's --keyring
argument can take a filename relative to the GnuPG home directory, i.e.
gpgv --keyring pubring.gpg < file
works and looks at ~/.gnupg/pubring.gpg whatever the current directory.

It would be nice if you could change this:

--- a/lib/debian/deb822.py
+++ b/lib/debian/deb822.py
@@ -663,7 +663,7 @@ class GpgInfo(dict):
         #args.extend(["--status-fd", "1", "--no-default-keyring"])
         args.extend(["--status-fd", "1"])
         import os
-        [args.extend(["--keyring", k]) for k in keyrings if os.path.isfile(k) and os.access(k, os.R_OK)]
+        [args.extend(["--keyring", k]) for k in keyrings]
         
         if "--keyring" not in args:
             raise IOError, "cannot access any of the given keyrings"

and that way rely on gnupg itself to find the keyring files.

Cheers,
Julien

-- System Information:
Debian Release: 6.0.1
  APT prefers stable
  APT policy: (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.32-5-amd64 (SMP w/8 CPU cores)
Locale: LANG=C, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages python-debian depends on:
ii  python                  2.6.6-3+squeeze6 interactive high-level object-orie
ii  python-chardet          2.0.1-1          universal character encoding detec
ii  python-support          1.0.10           automated rebuilding support for P

Versions of packages python-debian recommends:
ii  python-apt                    0.7.100.1  Python interface to libapt-pkg

Versions of packages python-debian suggests:
ii  gpgv                          1.4.10-4   GNU privacy guard - signature veri

-- no debconf information





More information about the pkg-python-debian-maint mailing list