mirror of
https://github.com/openSUSE/osc.git
synced 2025-02-02 17:56:15 +01:00
Add '--vm-memory' option to osc build
This commit is contained in:
parent
22d91a1064
commit
1cb3f9eed5
1
NEWS
1
NEWS
@ -2,6 +2,7 @@
|
|||||||
- highlight scheduled jobs with dispatch problems (due to constraints)
|
- highlight scheduled jobs with dispatch problems (due to constraints)
|
||||||
- allow to specify a log message in lock command
|
- allow to specify a log message in lock command
|
||||||
- Add '--wipe' option to osc chroot for deleting buildroots
|
- Add '--wipe' option to osc chroot for deleting buildroots
|
||||||
|
- Add '--vm-memory' option to osc build
|
||||||
|
|
||||||
0.155
|
0.155
|
||||||
- osc service runall: runs all service local, independend of the mode
|
- osc service runall: runs all service local, independend of the mode
|
||||||
|
@ -491,6 +491,7 @@ def main(apiurl, opts, argv):
|
|||||||
build_root = None
|
build_root = None
|
||||||
cache_dir = None
|
cache_dir = None
|
||||||
build_uid = ''
|
build_uid = ''
|
||||||
|
vm_memory = config['build-memory']
|
||||||
vm_type = config['build-type']
|
vm_type = config['build-type']
|
||||||
vm_telnet = None
|
vm_telnet = None
|
||||||
|
|
||||||
@ -571,6 +572,8 @@ def main(apiurl, opts, argv):
|
|||||||
else:
|
else:
|
||||||
print('Error: build-uid arg must be 2 colon separated numerics: "uid:gid" or "caller"', file=sys.stderr)
|
print('Error: build-uid arg must be 2 colon separated numerics: "uid:gid" or "caller"', file=sys.stderr)
|
||||||
return 1
|
return 1
|
||||||
|
if opts.vm_memory:
|
||||||
|
vm_memory = opts.vm_memory
|
||||||
if opts.vm_type:
|
if opts.vm_type:
|
||||||
vm_type = opts.vm_type
|
vm_type = opts.vm_type
|
||||||
if opts.vm_telnet:
|
if opts.vm_telnet:
|
||||||
@ -1110,8 +1113,8 @@ def main(apiurl, opts, argv):
|
|||||||
vm_options = [ '--vm-type=%s' % vm_type ]
|
vm_options = [ '--vm-type=%s' % vm_type ]
|
||||||
if vm_telnet:
|
if vm_telnet:
|
||||||
vm_options += [ '--vm-telnet=' + vm_telnet ]
|
vm_options += [ '--vm-telnet=' + vm_telnet ]
|
||||||
if config['build-memory']:
|
if vm_memory:
|
||||||
vm_options += [ '--memory=' + config['build-memory'] ]
|
vm_options += [ '--memory=' + vm_memory ]
|
||||||
if vm_type != 'lxc':
|
if vm_type != 'lxc':
|
||||||
vm_options += [ '--vm-disk=' + my_build_device ]
|
vm_options += [ '--vm-disk=' + my_build_device ]
|
||||||
vm_options += [ '--vm-swap=' + my_build_swap ]
|
vm_options += [ '--vm-swap=' + my_build_swap ]
|
||||||
@ -1127,8 +1130,6 @@ def main(apiurl, opts, argv):
|
|||||||
|
|
||||||
build_root += '/.mount'
|
build_root += '/.mount'
|
||||||
|
|
||||||
if config['build-memory']:
|
|
||||||
vm_options += [ '--memory=' + config['build-memory'] ]
|
|
||||||
if config['build-vmdisk-rootsize']:
|
if config['build-vmdisk-rootsize']:
|
||||||
vm_options += [ '--vmdisk-rootsize=' + config['build-vmdisk-rootsize'] ]
|
vm_options += [ '--vmdisk-rootsize=' + config['build-vmdisk-rootsize'] ]
|
||||||
if config['build-vmdisk-swapsize']:
|
if config['build-vmdisk-swapsize']:
|
||||||
|
@ -5826,6 +5826,8 @@ Please submit there instead, or use --nodevelproject to force direct submission.
|
|||||||
help='build a package which does not exist on the server')
|
help='build a package which does not exist on the server')
|
||||||
@cmdln.option('--linksources', action='store_true',
|
@cmdln.option('--linksources', action='store_true',
|
||||||
help='use hard links instead of a deep copied source')
|
help='use hard links instead of a deep copied source')
|
||||||
|
@cmdln.option('--vm-memory', metavar='TYPE',
|
||||||
|
help='use given MB for VM')
|
||||||
@cmdln.option('--vm-type', metavar='TYPE',
|
@cmdln.option('--vm-type', metavar='TYPE',
|
||||||
help='use VM type TYPE (e.g. kvm)')
|
help='use VM type TYPE (e.g. kvm)')
|
||||||
@cmdln.option('--vm-telnet', metavar='TELNET',
|
@cmdln.option('--vm-telnet', metavar='TELNET',
|
||||||
|
Loading…
Reference in New Issue
Block a user