[Piuparts-commits] [SCM] piuparts git repository branch, master, updated. eda668423fa87898c59d1075118693714aa5a053
Mika Pflüger
debian at mikapflueger.de
Fri Dec 23 10:25:58 UTC 2011
The following commit has been merged in the master branch:
commit 6cdbf198df65cd63a9b1731005748ecd35ebde85
Author: Mika Pflüger <debian at mikapflueger.de>
Date: Sat Nov 19 02:54:34 2011 +0100
Order the versions against which a bug was already filed to reduce noise.
Also, break out of loops earlier to reduce noise. Now only one action/advise
should be given per package ("was found earlier", "bts found" or "moving...").
diff --git a/debian/changelog b/debian/changelog
index 7313e00..27f4711 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -21,7 +21,9 @@ piuparts (0.42) UNRELEASED; urgency=low
* piuparts-analyze.py:
- Rewrite to use python-debianbts to analyze if bugs are filed already.
- The BTS only tracks source versions, so remove binNMU-part from
- package versions when comparing with versions from the BTS
+ package versions when comparing with versions from the BTS.
+ - Reduce noise in the output by only printing one action/advise per
+ package.
* debian/control: Add python-apt and python-debianbts to piuparts depends.
[ Scott Schaefer ]
diff --git a/piuparts-analyze.py b/piuparts-analyze.py
index f28afb3..500a016 100644
--- a/piuparts-analyze.py
+++ b/piuparts-analyze.py
@@ -124,9 +124,10 @@ 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."""
+ """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 [x.split('/', 1)[1] for x in debianbts.get_status((bug,))[0].found_versions]
+ return reversed(sorted([x.split('/', 1)[1] for x in debianbts.get_status((bug,))[0].found_versions], cmp=apt_pkg.version_compare))
def move_to_bugged(failed_log):
@@ -167,9 +168,10 @@ def mark_logs_with_reported_bugs():
elif apt_pkg.version_compare(pversion, bug_version) > 0: # pversion > bug_version
bugged_logs = find_bugged_logs(failed_log)
- if not bugged_logs:
+ if not bugged_logs and not moved:
print('%s/%s: Maybe the bug was filed earlier: %d against %s/%s'
% (pname, pversion, bug, pname, bug_version))
+ break
for bugged_log in bugged_logs:
old_pversion = package_source_version(bugged_log)
bugged_errors = extract_errors(bugged_log)
@@ -181,7 +183,8 @@ def mark_logs_with_reported_bugs():
if not moved:
mark_bugged_version(failed_log, bugged_log)
moved = True
- bts_update_found(bug, pversion)
+ bts_update_found(bug, pversion)
+ break
def report_packages_with_many_logs():
--
piuparts git repository
More information about the Piuparts-commits
mailing list