]> git.decadent.org.uk Git - dak.git/commitdiff
Merge remote branch 'mhy/master' into merge
authorMark Hymers <mhy@debian.org>
Thu, 24 Mar 2011 10:43:02 +0000 (10:43 +0000)
committerMark Hymers <mhy@debian.org>
Thu, 24 Mar 2011 10:43:02 +0000 (10:43 +0000)
Conflicts:
daklib/utils.py

Signed-off-by: Mark Hymers <mhy@debian.org>
1  2 
daklib/utils.py

diff --combined daklib/utils.py
index 0b2d8c87eca2bfbcc5933b603159ffffc0d568b8,02558deb38fd72d3a39588c9f0c9fe256a5561e3..c0a3bdff2936333d87385f473f4b031df08de180
@@@ -39,7 -39,7 +39,7 @@@ import r
  import email as modemail
  import subprocess
  
- from dbconn import DBConn, get_architecture, get_component, get_suite, get_override_type
 -from dbconn import DBConn, get_architecture, get_component, get_suite, Keyring
++from dbconn import DBConn, get_architecture, get_component, get_suite, get_override_type, Keyring
  from dak_exceptions import *
  from textutils import fix_maintainer
  from regexes import re_html_escaping, html_escaping, re_single_line_field, \
@@@ -588,46 -588,6 +588,46 @@@ def build_file_list(changes, is_a_dsc=0
  
  ################################################################################
  
 +# see http://bugs.debian.org/619131
 +def build_package_set(dsc, session = None):
 +    if not dsc.has_key("package-set"):
 +        return {}
 +
 +    packages = {}
 +
 +    for line in dsc["package-set"].split("\n"):
 +        if not line:
 +            break
 +
 +        (name, section, priority) = line.split()
 +        (section, component) = extract_component_from_section(section)
 +
 +        package_type = "deb"
 +        if name.find(":") != -1:
 +            (package_type, name) = name.split(":", 1)
 +        if package_type == "src":
 +            package_type = "dsc"
 +
 +        # Validate type if we have a session
 +        if session and get_override_type(package_type, session) is None:
 +            # Maybe just warn and ignore? exit(1) might be a bit hard...
 +            utils.fubar("invalid type (%s) in Package-Set." % (package_type))
 +
 +        if section == "":
 +            section = "-"
 +        if priority == "":
 +            priority = "-"
 +
 +        if package_type == "dsc":
 +            priority = "source"
 +
 +        if not packages.has_key(name) or packages[name]["type"] == "dsc":
 +            packages[name] = dict(priority=priority, section=section, type=package_type, component=component, files=[])
 +
 +    return packages
 +
 +################################################################################
 +
  def send_mail (message, filename=""):
      """sendmail wrapper, takes _either_ a message string or a file as arguments"""
  
@@@ -1336,7 -1296,7 +1336,7 @@@ def check_signature (sig_filename, data
          return (None, rejects)
  
      if not keyrings:
-         keyrings = Cnf.ValueList("Dinstall::GPGKeyring")
+         keyrings = [ x.keyring_name for x in DBConn().session().query(Keyring).all() ]
  
      # Autofetch the signing key if that's enabled
      if autofetch == None: