[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[dak/master] process-new: Indicate which packages were not include in upload



Show "NOT UPLOADED" besides overrides for packages that were not
included in the upload.
---
 dak/process_new.py |    9 ++++++---
 daklib/policy.py   |    8 +++++---
 2 files changed, 11 insertions(+), 6 deletions(-)

diff --git a/dak/process_new.py b/dak/process_new.py
index cd53dba..55397c7 100755
--- a/dak/process_new.py
+++ b/dak/process_new.py
@@ -155,10 +155,11 @@ def print_new (upload, missing, indexed, session, file=sys.stdout):
             package = m['package']
         section = m['section']
         priority = m['priority']
+        included = "" if m['included'] else "NOT UPLOADED"
         if indexed:
-            line = "(%s): %-20s %-20s %-20s" % (index, package, priority, section)
+            line = "(%s): %-20s %-20s %-20s %s" % (index, package, priority, section, included)
         else:
-            line = "%-20s %-20s %-20s" % (package, priority, section)
+            line = "%-20s %-20s %-20s %s" % (package, priority, section, included)
         line = line.strip()
         if not m['valid']:
             line = line + ' [!]'
@@ -218,7 +219,8 @@ def edit_new (overrides, upload, session):
             type, pkg = pkg.split(':', 1)
         else:
             type = 'deb'
-        if (type, pkg) not in overrides_map:
+        o = overrides_map.get((type, pkg), None)
+        if o is None:
             utils.warn("Ignoring unknown package '%s'" % (pkg))
         else:
             if section.find('/') != -1:
@@ -231,6 +233,7 @@ def edit_new (overrides, upload, session):
                     section=section,
                     component=component,
                     priority=priority,
+                    included=o['included'],
                     ))
     return new_overrides
 
diff --git a/daklib/policy.py b/daklib/policy.py
index 1c63276..943d568 100644
--- a/daklib/policy.py
+++ b/daklib/policy.py
@@ -249,7 +249,7 @@ class PolicyQueueUploadHandler(object):
             hints = []
         hints_map = dict([ ((o['type'], o['package']), o) for o in hints ])
 
-        def check_override(name, type, priority, section):
+        def check_override(name, type, priority, section, included):
             component = 'main'
             if section.find('/') != -1:
                 component = section.split('/', 1)[0]
@@ -266,6 +266,7 @@ class PolicyQueueUploadHandler(object):
                             section = section,
                             component = component,
                             type = type,
+                            included = included
                             ))
             components.add(component)
 
@@ -273,7 +274,7 @@ class PolicyQueueUploadHandler(object):
             binary_proxy = binary.proxy
             priority = binary_proxy['Priority']
             section = binary_proxy['Section']
-            check_override(binary.package, binary.binarytype, priority, section)
+            check_override(binary.package, binary.binarytype, priority, section, included=True)
 
         if source is not None:
             source_proxy = source.proxy
@@ -281,7 +282,7 @@ class PolicyQueueUploadHandler(object):
             if not package_list.fallback:
                 packages = package_list.packages_for_suite(self.upload.target_suite)
                 for p in packages:
-                    check_override(p.name, p.type, p.priority, p.section)
+                    check_override(p.name, p.type, p.priority, p.section, included=False)
 
         source_component = '(unknown)'
         for component, in self.session.query(Component.component_name).order_by(Component.ordering):
@@ -310,6 +311,7 @@ class PolicyQueueUploadHandler(object):
                             section = section,
                             component = source_component,
                             type = 'dsc',
+                            included = True,
                             ))
 
         return missing
-- 
1.7.10.4


Reply to: