[Piuparts-commits] [SCM] piuparts git repository branch, piatti, updated. 0.44-598-gace668e

Holger Levsen holger at layer-acht.org
Sun May 27 13:47:46 UTC 2012


The following commit has been merged in the piatti branch:
commit c39c32a2380bf6c40a60e21274d973cb97e4d2ff
Author: Andreas Beckmann <debian at abeckmann.de>
Date:   Fri May 25 17:32:25 2012 +0200

    p-analyze: skip further bugs/versions if we found a match
    
    * shortcut the evaluation of further bugs once we found a match
    * check for a matching version before reporting older versions
    
    Signed-off-by: Andreas Beckmann <debian at abeckmann.de>

diff --git a/debian/changelog b/debian/changelog
index 0b79214..cbf088c 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -34,6 +34,8 @@ piuparts (0.45) UNRELEASED; urgency=low
       non-circular dependencies are satisfied.
   * piuparts-report.py:
     - Exclude obsolete states from generated report.
+  * piuparts-analyze.py:
+    - Don't report further bugs/versions if we found a match.
   * Remove known_circular_depends from piuparts.conf handling.
   * Remove static list known_circular_depends from piuparts.conf.
 
diff --git a/piuparts-analyze.py b/piuparts-analyze.py
index 1066678..4fc9b1c 100644
--- a/piuparts-analyze.py
+++ b/piuparts-analyze.py
@@ -157,16 +157,17 @@ def mark_logs_with_reported_bugs():
         failed_errors = extract_errors(failed_log)
         moved = False
         for bug in piuparts_bugs_in(pname):
-            for bug_version in get_bug_versions(bug):
+            if moved:
+                break
+            found_versions = get_bug_versions(bug)
+            if pversion in found_versions:
+                move_to_bugged(failed_log)
+                moved = True
+                break
+            for bug_version in found_versions:
                 #print('DEBUG: %s/%s #%d %s' % (pname, pversion, bug, bug_version))
 
-                if apt_pkg.version_compare(pversion, bug_version) == 0: # pversion == bug_version
-                    if not moved:
-                        move_to_bugged(failed_log)
-                        moved = True
-                    break
-
-                elif apt_pkg.version_compare(pversion, bug_version) > 0: # pversion > bug_version
+                if apt_pkg.version_compare(pversion, bug_version) > 0: # pversion > bug_version
                     bugged_logs = find_bugged_logs(failed_log)
                     if not bugged_logs and not moved:
                         print('%s/%s: Maybe the bug was filed earlier: http://bugs.debian.org/%d against %s/%s'

-- 
piuparts git repository



More information about the Piuparts-commits mailing list