]> git.decadent.org.uk Git - dak.git/blobdiff - daklib/policy.py
Use Squeezy key instead of the expired Lenny key.
[dak.git] / daklib / policy.py
index cfb0e1df0446dcf9a3bd8fc8a4ce705181ea7a5c..41c9c1fe2a1d6e4aa17c688c07f988a436a1f3b8 100644 (file)
@@ -17,7 +17,7 @@
 """module to process policy queue uploads"""
 
 from .config import Config
-from .dbconn import BinaryMetadata, Component, MetadataKey, Override, OverrideType, get_mapped_component
+from .dbconn import BinaryMetadata, Component, MetadataKey, Override, OverrideType, Suite, get_mapped_component
 from .fstransactions import FilesystemTransaction
 from .regexes import re_file_changes, re_file_safe
 import daklib.utils as utils
@@ -196,7 +196,7 @@ class PolicyQueueUploadHandler(object):
 
         fn = os.path.join(self.upload.policy_queue.path, 'COMMENTS', fn1)
         try:
-            fh = os.open(fn, os.O_CREAT | os.O_EXCL | os.O_WRONLY)
+            fh = os.open(fn, os.O_CREAT | os.O_EXCL | os.O_WRONLY, 0o644)
             os.write(fh, 'NOTOK\n')
             os.write(fh, 'From: {0} <{1}>\n\n'.format(utils.whoami(), cnf['Dinstall::MyAdminAddress']))
             os.write(fh, reason)
@@ -255,7 +255,7 @@ class PolicyQueueUploadHandler(object):
             if section.find('/') != -1:
                 component = section.split('/', 1)[0]
             override = self._binary_override(binary, component)
-            if override is None:
+            if override is None and not any(o['package'] == binary.package and o['type'] == binary.binarytype for o in missing):
                 hint = hints_map.get((binary.binarytype, binary.package))
                 if hint is not None:
                     missing.append(hint)