1
0
mirror of https://github.com/openSUSE/osc.git synced 2025-01-26 22:56:15 +01:00

* use a release number setting on local build, if it is given by the server.

Otherwise just use 0 as fallback
This commit is contained in:
Adrian Schröter 2009-08-20 10:45:39 +00:00
parent 2a180fa346
commit 090e79964c

View File

@ -54,7 +54,6 @@ class Buildinfo:
"""represent the contents of a buildinfo file""" """represent the contents of a buildinfo file"""
def __init__(self, filename, apiurl, buildtype = 'spec'): def __init__(self, filename, apiurl, buildtype = 'spec'):
try: try:
tree = ET.parse(filename) tree = ET.parse(filename)
except: except:
@ -82,6 +81,9 @@ class Buildinfo:
self.pacsuffix = 'deb' self.pacsuffix = 'deb'
self.buildarch = root.find('arch').text self.buildarch = root.find('arch').text
self.release = "0"
if root.find('release') != None:
self.release = root.find('release').text
self.downloadurl = root.get('downloadurl') self.downloadurl = root.get('downloadurl')
self.debuginfo = 0 self.debuginfo = 0
if root.find('debuginfo') != None: if root.find('debuginfo') != None:
@ -534,13 +536,14 @@ def main(opts, argv):
cmd = '%s --root=%s --rpmlist=%s --dist=%s %s --arch=%s %s %s %s' \ cmd = '%s --root=%s --rpmlist=%s --dist=%s %s --arch=%s --release=%s %s %s %s' \
% (config['build-cmd'], % (config['build-cmd'],
config['build-root'], config['build-root'],
rpmlist_file.name, rpmlist_file.name,
bc_file.name, bc_file.name,
specialcmdopts, specialcmdopts,
bi.buildarch, bi.buildarch,
bi.release,
vm_options, vm_options,
build_descr, build_descr,
buildargs) buildargs)