[Piuparts-commits] [SCM] piuparts git repository branch, master, updated. eda668423fa87898c59d1075118693714aa5a053

Mika Pflüger debian at mikapflueger.de
Fri Dec 23 10:25:59 UTC 2011


The following commit has been merged in the master branch:
commit d11c275fddec946ed571ecac909d496a460d82eb
Author: Mika Pflüger <debian at mikapflueger.de>
Date:   Mon Nov 21 15:39:04 2011 +0100

    Fix extraction of package versions from bugs.

diff --git a/debian/changelog b/debian/changelog
index 27f4711..b2a56e9 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -24,6 +24,8 @@ piuparts (0.42) UNRELEASED; urgency=low
       package versions when comparing with versions from the BTS.
     - Reduce noise in the output by only printing one action/advise per
       package.
+    - Fix extraction of package versions from bug reports. Thanks to
+      Andreas Beckmann for catching and solving the error.
   * debian/control: Add python-apt and python-debianbts to piuparts depends.
 
   [ Scott Schaefer ]
diff --git a/piuparts-analyze.py b/piuparts-analyze.py
index 500a016..aeccdb1 100644
--- a/piuparts-analyze.py
+++ b/piuparts-analyze.py
@@ -126,8 +126,8 @@ def prepend_to_file(filename, data):
 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 which will become 1.2.3
-    return reversed(sorted([x.split('/', 1)[1] for x in debianbts.get_status((bug,))[0].found_versions], cmp=apt_pkg.version_compare))
+    # 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))
 
 
 def move_to_bugged(failed_log):

-- 
piuparts git repository



More information about the Piuparts-commits mailing list