[Piuparts-commits] [SCM] piuparts git repository branch, develop, updated. 0.42-30-gaa772de

Andreas Beckmann debian at abeckmann.de
Thu Jan 19 22:37:50 UTC 2012


The following commit has been merged in the develop branch:
commit aa772dedb15914944e48002cb85339ffcc06899c
Author: Andreas Beckmann <debian at abeckmann.de>
Date:   Thu Jan 19 11:43:18 2012 +0100

    treat bugs without 'found' as version '~'
    
    Do not ignore bugs that have no proper 'found' version set and
    use '~' thats older than anything (except ~~ and so on).
    
    Signed-off-by: Andreas Beckmann <debian at abeckmann.de>

diff --git a/debian/changelog b/debian/changelog
index 7ae242a..efc6be5 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -25,6 +25,7 @@ piuparts (0.43) UNRELEASED; urgency=low
     - Correctly split + strip comma-separated lists.
   * piuparts-analyze.py:
     - Also consider bugs that 'affects' a package.
+    - Treat bugs without 'found' version as older than anything.
   * Makefile: Support version number substitution in piuparts-*.py, too.
   * README.txt: Document piuparts.conf settings used by piatti.git scripts.
 
diff --git a/piuparts-analyze.py b/piuparts-analyze.py
index 98f7d00..695a13d 100644
--- a/piuparts-analyze.py
+++ b/piuparts-analyze.py
@@ -127,7 +127,7 @@ def get_bug_versions(bug):
     """Gets a list of only the version numbers for which the bug is found.
     Newest versions are returned first."""
     # debianbts returns it in the format package/1.2.3 or 1.2.3 which will become 1.2.3
-    return reversed(sorted([x.rsplit('/', 1)[-1] for x in debianbts.get_status((bug,))[0].found_versions], cmp=apt_pkg.version_compare))
+    return list(reversed(sorted([x.rsplit('/', 1)[-1] for x in debianbts.get_status((bug,))[0].found_versions], cmp=apt_pkg.version_compare))) or ['~']
 
 
 def move_to_bugged(failed_log):
@@ -159,6 +159,7 @@ def mark_logs_with_reported_bugs():
         moved = False
         for bug in piuparts_bugs_in(pname):
             for bug_version in get_bug_versions(bug):
+                #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:

-- 
piuparts git repository



More information about the Piuparts-commits mailing list