1
0
mirror of https://github.com/openSUSE/osc.git synced 2024-12-26 09:56:13 +01:00

implement build --release

This commit is contained in:
Ludwig Nussel 2009-12-01 13:36:11 +00:00
parent 8ed237141a
commit 1ff4978b98
2 changed files with 13 additions and 3 deletions

View File

@ -82,9 +82,10 @@ class Buildinfo:
self.pacsuffix = 'deb'
self.buildarch = root.find('arch').text
self.release = "0"
if root.find('release') != None:
self.release = root.find('release').text
else:
self.release = None
self.downloadurl = root.get('downloadurl')
self.debuginfo = 0
if root.find('debuginfo') != None:
@ -451,8 +452,16 @@ def main(opts, argv):
raise
bi = Buildinfo(bi_filename, apiurl, build_type, prefer_pkgs.keys())
if bi.debuginfo and not opts.disable_debuginfo:
buildargs.append('--debug')
if opts.release:
bi.release = opts.release
if bi.release:
buildargs.append('--release %s' % bi.release)
buildargs = ' '.join(set(buildargs))
# real arch of this machine
@ -608,14 +617,13 @@ def main(opts, argv):
specialcmdopts += '--overlay=%s' \
% (myoverlay)
cmd = '%s --root=%s --rpmlist=%s --dist=%s %s --arch=%s --release=%s %s %s %s' \
cmd = '%s --root=%s --rpmlist=%s --dist=%s %s --arch=%s %s %s %s' \
% (config['build-cmd'],
build_root,
rpmlist_filename,
bc_filename,
specialcmdopts,
bi.buildarch,
bi.release,
vm_options,
build_descr,
buildargs)

View File

@ -2929,6 +2929,8 @@ Please submit there instead, or use --nodevelproject to force direct submission.
help='disable build of debuginfo packages')
@cmdln.option('-b', '--baselibs', action='store_true',
help='Create -32bit/-64bit/-x86 rpms for other architectures')
@cmdln.option('--release', metavar='N',
help='set release number of the package to N')
def do_build(self, subcmd, opts, *args):
"""${cmd_name}: Build a package on your local machine