From 4f99bf5466b58d5758f2f91486de10b3b21d171b Mon Sep 17 00:00:00 2001 From: Jonathan Davies Date: Wed, 31 Dec 2008 22:37:21 +0000 Subject: [PATCH] * buildd: Added checks for arch-indep packages and packages which have no builds in a release. * hugdaylist: String improvements. --- buildd | 15 ++++++++++++++- debian/changelog | 5 ++++- hugdaylist | 5 +++-- 3 files changed, 21 insertions(+), 4 deletions(-) diff --git a/buildd b/buildd index 422cd94..2d99326 100755 --- a/buildd +++ b/buildd @@ -117,7 +117,7 @@ url = page.geturl() page = page.read() release = release.split('-')[0] # strip off pocket -print "Current build status for this package is as follows:" +print "Current build status for this package:" for m in re.finditer('"/ubuntu/\+source/%s/%s(/\+build/\d+)"[^\n]+\n\s*(\w+).*?(\w+).*?\s*([^\n]+)\n' % (package.replace('+', '\+'), version.replace('+', '\+')), page, re.S): @@ -125,6 +125,19 @@ for m in re.finditer('"/ubuntu/\+source/%s/%s(/\+build/\d+)"[^\n]+\n\s*(\w+).*?< print '%s: %s.' % (m.group(3), m.group(4)) buildstats[url + m.group(1)] = [m.group(3).strip(), m.group(4).strip()] +# Check that there actually are builds for that release. +if len(buildstats) == 0: + print "No builds for '%s' found in the %s release - it may have been " \ + "built in a former release." % (package, release.capitalize()) + sys.exit(0) + +# Check if the package in question is architecture independent, and if so; that +# i386 has been set as the architecture. +if len(buildstats) == 1 and options.architecture != "i386": + print "Overriding architecture setting to i386 for architecture " \ + "independent package..." + options.architecture = "i386" + # Operations. if op == 'status': sys.exit(0) diff --git a/debian/changelog b/debian/changelog index a2840aa..3b7dd48 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,6 +1,9 @@ ubuntu-dev-tools (0.51) UNRELEASED; urgency=low - * Change go here. + [ Jonathan Davies ] + * buildd: Added checks for arch-indep packages and packages which have no + builds in a release. + * hugdaylist: String improvements. -- Jonathan Davies Tue, 30 Dec 2008 15:51:55 +0000 diff --git a/hugdaylist b/hugdaylist index 8c9937c..4498bd7 100755 --- a/hugdaylist +++ b/hugdaylist @@ -91,13 +91,14 @@ def main(): try: bl = BugList(url) except: - print >> sys.stderr, "The page '%s' does not appear to exist." % url + print >> sys.stderr, "The URL at '%s' does not appear to have a bug " \ + "list." % url sys.exit(1) l = filter(filter_unsolved, bl) if not l: - print "BugList of %s is empty." % url + print "Bug list of %s is empty." % url sys.exit(0) if howmany == -1: howmany = len(l)