]> git.decadent.org.uk Git - dak.git/blobdiff - daklib/queue.py
Adding install-info-used-in-maintainer-script to the non-fatal
[dak.git] / daklib / queue.py
index 4ea117b30883abaa2f04a3510e4dd3cdf08af03b..c81ef8ea20fbee5dd0f8a2918a2447a4ea142c7d 100755 (executable)
@@ -56,16 +56,6 @@ from textutils import fix_maintainer
 from lintian import parse_lintian_output, generate_reject_messages
 from contents import UnpackedSource
 
-# suppress some deprecation warnings in squeeze related to apt_pkg
-# module
-import warnings
-warnings.filterwarnings('ignore', \
-    "apt_pkg.ParseSection\(\) is deprecated. Please see apt_pkg\.TagSection\(\) for the replacement\.", \
-    DeprecationWarning)
-warnings.filterwarnings('ignore', \
-    "Attribute 'Find' of the 'apt_pkg\.TagSection' object is deprecated, use 'find' instead\.", \
-    DeprecationWarning)
-
 ###############################################################################
 
 def get_type(f, session):
@@ -105,7 +95,7 @@ def get_type(f, session):
 
 # Determine what parts in a .changes are NEW
 
-def determine_new(filename, changes, files, warn=1, session = None, dsc = None, new = {}):
+def determine_new(filename, changes, files, warn=1, session = None, dsc = None, new = None):
     """
     Determine what parts in a C{changes} file are NEW.
 
@@ -134,6 +124,8 @@ def determine_new(filename, changes, files, warn=1, session = None, dsc = None,
     # TODO: This should all use the database instead of parsing the changes
     # file again
     byhand = {}
+    if new is None:
+        new = {}
 
     dbchg = get_dbchange(filename, session)
     if dbchg is None:
@@ -1272,7 +1264,7 @@ class Upload(object):
 
         session.close()
 
-        return True
+        return (len(self.rejects) == 0)
 
     ###########################################################################
 
@@ -2459,6 +2451,8 @@ distribution."""
         if self.logger:
             self.logger.log(["rejected", self.pkg.changes_file])
 
+        stats = SummaryStats()
+        stats.reject_count += 1
         return 0
 
     ################################################################################
@@ -2555,6 +2549,12 @@ distribution."""
 
         # Check versions for each target suite
         for target_suite in self.pkg.changes["distribution"].keys():
+            # Check we can find the target suite
+            ts = get_suite(target_suite)
+            if ts is None:
+                self.rejects.append("Cannot find target suite %s to perform version checks" % target_suite)
+                continue
+
             must_be_newer_than = [ vc.reference.suite_name for vc in get_version_checks(target_suite, "MustBeNewerThan") ]
             must_be_older_than = [ vc.reference.suite_name for vc in get_version_checks(target_suite, "MustBeOlderThan") ]