Rev 101: package-bug should not block us checking if upstream is ok. in http://bazaar.launchpad.net/~canonical-bazaar/udd/hottest100
John Arbash Meinel
john at arbash-meinel.com
Wed Jan 27 15:46:30 GMT 2010
At http://bazaar.launchpad.net/~canonical-bazaar/udd/hottest100
------------------------------------------------------------
revno: 101
revision-id: john at arbash-meinel.com-20100127154603-qoxt3osgm5bnfqg5
parent: john at arbash-meinel.com-20100127153319-a48sx4x6i2tqljw6
committer: John Arbash Meinel <john at arbash-meinel.com>
branch nick: hottest100
timestamp: Wed 2010-01-27 09:46:03 -0600
message:
package-bug should not block us checking if upstream is ok.
-------------- next part --------------
=== modified file 'check-hottest.py'
--- a/check-hottest.py 2010-01-27 10:52:18 +0000
+++ b/check-hottest.py 2010-01-27 15:46:03 +0000
@@ -167,19 +167,11 @@
package_categories.categorize(reason, package)
upstream_branch_categories.categorize(reason, package)
continue
- known_buggy = False
- stale_days = opts.stale_days
+ package_bug = None
for tag in package.tags:
- if (tag.startswith('package-bug:')
- or tag.startswith('upstream-bug:')):
- # This package import has a known bug
+ if tag.startswith('package-bug:'):
package_categories.categorize(tag, package)
- upstream_branch_categories.categorize(tag, package)
- known_buggy = True
- if tag.startswith('slow-upstream:'):
- stale_days = int(tag.split(':', 1)[1])
- if known_buggy:
- continue
+ package_bug = tag
pb.update("checking %s" % (package.name), i+1, len(packages))
# exact_match -> see <https://bugs.launchpad.net/launchpad/+bug/512878>,
@@ -194,28 +186,40 @@
published_source = published_sources[0]
source_package_version = published_source.source_package_version
- try:
- package_branch_url = 'lp:ubuntu/%s' % (package.name,)
- age, tags = get_branch_age_and_tags(package_branch_url)
- except errors.BzrError, e:
- # the launchpad plugin sends
- # <class 'bzrlib.errors.InvalidURL'> Invalid url supplied to transport:
- # "lp:ubuntu/hal": hal in ubuntu has no default branch.
- if str(e).find('in ubuntu has no default branch') > -1:
- output_stream.write(' %s has no default branch\n'
- % (package_branch_url,))
- package_categories.categorize('no_package_branch', package)
- else:
- output_stream.write(' %s\n' % (e,))
- package_categories.categorize('broken', package)
- else:
- if source_package_version not in tags:
- package_categories.categorize('package_out_of_date', package)
- else:
- package_categories.categorize('ok', package)
- output_stream.write(fmt_str % (
- package_branch_url, age.days, source_package_version))
+ if package_bug is None:
+ try:
+ package_branch_url = 'lp:ubuntu/%s' % (package.name,)
+ age, tags = get_branch_age_and_tags(package_branch_url)
+ except errors.BzrError, e:
+ # the launchpad plugin sends
+ # <class 'bzrlib.errors.InvalidURL'> Invalid url supplied to
+ # transport: "lp:ubuntu/hal": hal in ubuntu has no default
+ # branch.
+ if str(e).find('in ubuntu has no default branch') > -1:
+ output_stream.write(' %s has no default branch\n'
+ % (package_branch_url,))
+ package_categories.categorize('no_package_branch', package)
+ else:
+ output_stream.write(' %s\n' % (e,))
+ package_categories.categorize('broken', package)
+ else:
+ if source_package_version not in tags:
+ package_categories.categorize('package_out_of_date', package)
+ else:
+ package_categories.categorize('ok', package)
+ output_stream.write(fmt_str % (
+ package_branch_url, age.days, source_package_version))
+ stale_days = opts.stale_days
+ upstream_bug = None
+ for tag in package.tags:
+ if tag.startswith('upstream-bug:'):
+ upstream_categories.categorize(tag, package)
+ upstream_bug = tag
+ if tag.startswith('slow-upstream:'):
+ stale_days = int(tag.split(':', 1)[1])
+ if upstream_bug is not None:
+ continue
source_package = published_source.distro_series.getSourcePackage(name=package.name)
if source_package.productseries is None:
upstream_branch_categories.categorize('missing_upstream_link', package)
More information about the bazaar-commits
mailing list