import apt_pkg
from daklib import utils
-from daklib.dbconn import DBConn, get_or_set_uid
+from daklib.dbconn import DBConn, get_or_set_uid, get_active_keyring_paths
from daklib.regexes import re_gpg_fingerprint_colon, re_user_address, re_user_mails, re_user_name
################################################################################
session = DBConn().session()
if not keyrings:
- keyrings = Cnf.ValueList("Dinstall::GPGKeyring")
+ keyrings = get_active_keyring_paths()
cmd = "gpg --with-colons --no-secmem-warning --no-auto-check-trustdb --no-default-keyring %s --with-fingerprint --list-key %s" \
% (utils.gpg_keyring_args(keyrings),
import email as modemail
import subprocess
-from dbconn import DBConn, get_architecture, get_component, get_suite, get_override_type, Keyring, session_wrapper
+from dbconn import DBConn, get_architecture, get_component, get_suite, \
+ get_override_type, Keyring, session_wrapper, \
+ get_active_keyring_paths, get_primary_keyring_path
+from sqlalchemy import desc
from dak_exceptions import *
from gpg import SignedFile
from textutils import fix_maintainer
if not keyserver:
keyserver = Cnf["Dinstall::KeyServer"]
if not keyring:
- keyring = Cnf.ValueList("Dinstall::GPGKeyring")[0]
+ keyring = get_primary_keyring_path()
# Ensure the filename contains no shell meta-characters or other badness
if not re_taint_free.match(filename):
def gpg_keyring_args(keyrings=None):
if not keyrings:
- keyrings = Cnf.ValueList("Dinstall::GPGKeyring")
+ keyrings = get_active_keyring_paths()
return " ".join(["--keyring %s" % x for x in keyrings])