mirror of
https://git.launchpad.net/ubuntu-dev-tools
synced 2025-05-10 08:21:29 +00:00
* buildd:
- Do not rescore packages not in the build queue. - Sort archs in order.
This commit is contained in:
parent
f48309fd48
commit
d84d815050
16
buildd
16
buildd
@ -71,8 +71,8 @@ if op not in ("retry", 'rescore') and options.architecture:
|
|||||||
print >> sys.stderr, "Operation %s does not use the --arch option." % op
|
print >> sys.stderr, "Operation %s does not use the --arch option." % op
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
elif op in ("retry", "rescore") and options.architecture:
|
elif op in ("retry", "rescore") and options.architecture:
|
||||||
if options.architecture not in ("sparc", "powerpc", "lpia", "ia64", "i386",
|
if options.architecture not in ("amd64", "hppa", "i386", "ia64", "lpia",
|
||||||
"hppa", "amd64"):
|
"powerpc", "sparc"):
|
||||||
print >> sys.stderr, "Invalid architecture specified: %s." % options.architecture
|
print >> sys.stderr, "Invalid architecture specified: %s." % options.architecture
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
else:
|
else:
|
||||||
@ -105,13 +105,14 @@ version = m.group(1)
|
|||||||
print "The source version for '%s' in %s is at %s." % (package,
|
print "The source version for '%s' in %s is at %s." % (package,
|
||||||
release.capitalize(), version)
|
release.capitalize(), version)
|
||||||
|
|
||||||
print "Current build status for this package is as follows:"
|
|
||||||
|
|
||||||
# Parse out build URLs, states, and arches.
|
# Parse out build URLs, states, and arches.
|
||||||
buildstats = {}
|
buildstats = {}
|
||||||
page = urlopener.open('https://launchpad.net/ubuntu/+source/%s/%s' % (package, version))
|
page = urlopener.open('https://launchpad.net/ubuntu/+source/%s/%s' % (package, version))
|
||||||
url = page.geturl()
|
url = page.geturl()
|
||||||
page = page.read()
|
page = page.read()
|
||||||
|
|
||||||
|
print "Current build status for this package is as follows:"
|
||||||
|
|
||||||
for m in re.finditer('"/ubuntu/\+source/%s/%s(/\+build/\d+)"[^\n]+\n\s*(\w+).*?<span>(\w+)</span>.*?</a>\s*([^\n]+)\n' %
|
for m in re.finditer('"/ubuntu/\+source/%s/%s(/\+build/\d+)"[^\n]+\n\s*(\w+).*?<span>(\w+)</span>.*?</a>\s*([^\n]+)\n' %
|
||||||
(package.replace('+', '\+'), version.replace('+', '\+')), page, re.S):
|
(package.replace('+', '\+'), version.replace('+', '\+')), page, re.S):
|
||||||
if m.group(2) == release:
|
if m.group(2) == release:
|
||||||
@ -127,12 +128,19 @@ for build, (arch, status) in buildstats.iteritems():
|
|||||||
# Skip this architecture.
|
# Skip this architecture.
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
# Check if our package is successfully built and retry/rescore requested.
|
||||||
if oneArch and options.architecture == arch:
|
if oneArch and options.architecture == arch:
|
||||||
if status in ('Successfully built'):
|
if status in ('Successfully built'):
|
||||||
print "Package has been marked as successfully built on %s." % arch
|
print "Package has been marked as successfully built on %s." % arch
|
||||||
print "A %s of this package shall not be requested." % op
|
print "A %s of this package shall not be requested." % op
|
||||||
sys.exit(0)
|
sys.exit(0)
|
||||||
|
|
||||||
|
# Check if package is building, before rescoring.
|
||||||
|
if oneArch and options.architecture == arch:
|
||||||
|
if op == "rescore" and status not in ("Needs building"):
|
||||||
|
print "Package is not in the build queue on %s - shall not " \
|
||||||
|
"rescore it." % arch
|
||||||
|
|
||||||
if op == 'rescore':
|
if op == 'rescore':
|
||||||
if status == 'Needs building':
|
if status == 'Needs building':
|
||||||
print 'Rescoring', build, '(%s).' % arch
|
print 'Rescoring', build, '(%s).' % arch
|
||||||
|
Loading…
x
Reference in New Issue
Block a user