From 268fea2a1c3e944d1c0da363450fd74d92ed9d37 Mon Sep 17 00:00:00 2001 From: Stefano Rivera Date: Mon, 12 Sep 2011 11:00:23 +0200 Subject: [PATCH] syncpackage: Looks like we can't expect exactly one DSD record for every source package (LP: #846890) --- debian/changelog | 5 +++++ syncpackage | 11 ++++++----- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/debian/changelog b/debian/changelog index 43ab057..623310b 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,9 +1,14 @@ ubuntu-dev-tools (0.132) UNRELEASED; urgency=low + [ Benjamin Drung ] * sponsor-patch: - Refactor code. - Support sync requests and make ack-sync obsolete (LP: #764763). + [ Stefano Rivera ] + * syncpackage: Looks like we can't expect exactly one DSD record for every + source package (LP: #846890) + -- Benjamin Drung Sat, 10 Sep 2011 19:58:38 +0200 ubuntu-dev-tools (0.131) unstable; urgency=low diff --git a/syncpackage b/syncpackage index bd00e5c..a57a891 100755 --- a/syncpackage +++ b/syncpackage @@ -414,11 +414,12 @@ def is_blacklisted(query): comments = [c.body_text + u' -- ' + c.comment_author.name for c in lp_comments] - diff = series.getDifferencesTo(source_package_name_filter=query)[0] - if diff.status == 'Blacklisted current version': - blacklisted = 'CURRENT' - if diff.status == 'Blacklisted always': - blacklisted = 'ALWAYS' + for diff in series.getDifferencesTo(source_package_name_filter=query): + if (diff.status == 'Blacklisted current version' + and blacklisted != 'ALWAYS'): + blacklisted = 'CURRENT' + if diff.status == 'Blacklisted always': + blacklisted = 'ALWAYS' # Old blacklist: url = 'http://people.canonical.com/~ubuntu-archive/sync-blacklist.txt'