mirror of
https://github.com/openSUSE/osc.git
synced 2024-12-27 02:16:12 +01:00
implement build --release
This commit is contained in:
parent
8ed237141a
commit
1ff4978b98
14
osc/build.py
14
osc/build.py
@ -82,9 +82,10 @@ 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:
|
if root.find('release') != None:
|
||||||
self.release = root.find('release').text
|
self.release = root.find('release').text
|
||||||
|
else:
|
||||||
|
self.release = None
|
||||||
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:
|
||||||
@ -451,8 +452,16 @@ def main(opts, argv):
|
|||||||
raise
|
raise
|
||||||
|
|
||||||
bi = Buildinfo(bi_filename, apiurl, build_type, prefer_pkgs.keys())
|
bi = Buildinfo(bi_filename, apiurl, build_type, prefer_pkgs.keys())
|
||||||
|
|
||||||
if bi.debuginfo and not opts.disable_debuginfo:
|
if bi.debuginfo and not opts.disable_debuginfo:
|
||||||
buildargs.append('--debug')
|
buildargs.append('--debug')
|
||||||
|
|
||||||
|
if opts.release:
|
||||||
|
bi.release = opts.release
|
||||||
|
|
||||||
|
if bi.release:
|
||||||
|
buildargs.append('--release %s' % bi.release)
|
||||||
|
|
||||||
buildargs = ' '.join(set(buildargs))
|
buildargs = ' '.join(set(buildargs))
|
||||||
|
|
||||||
# real arch of this machine
|
# real arch of this machine
|
||||||
@ -608,14 +617,13 @@ def main(opts, argv):
|
|||||||
specialcmdopts += '--overlay=%s' \
|
specialcmdopts += '--overlay=%s' \
|
||||||
% (myoverlay)
|
% (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'],
|
% (config['build-cmd'],
|
||||||
build_root,
|
build_root,
|
||||||
rpmlist_filename,
|
rpmlist_filename,
|
||||||
bc_filename,
|
bc_filename,
|
||||||
specialcmdopts,
|
specialcmdopts,
|
||||||
bi.buildarch,
|
bi.buildarch,
|
||||||
bi.release,
|
|
||||||
vm_options,
|
vm_options,
|
||||||
build_descr,
|
build_descr,
|
||||||
buildargs)
|
buildargs)
|
||||||
|
@ -2929,6 +2929,8 @@ Please submit there instead, or use --nodevelproject to force direct submission.
|
|||||||
help='disable build of debuginfo packages')
|
help='disable build of debuginfo packages')
|
||||||
@cmdln.option('-b', '--baselibs', action='store_true',
|
@cmdln.option('-b', '--baselibs', action='store_true',
|
||||||
help='Create -32bit/-64bit/-x86 rpms for other architectures')
|
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):
|
def do_build(self, subcmd, opts, *args):
|
||||||
"""${cmd_name}: Build a package on your local machine
|
"""${cmd_name}: Build a package on your local machine
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user