1
0
mirror of https://github.com/openSUSE/osc.git synced 2025-08-30 18:04:11 +02:00

build environement parameter caching

repository, architecture and vm_type from last build is automatically
reused if not specified otherwise.
This commit is contained in:
2019-12-04 09:45:17 +01:00
parent 47e346dde8
commit b329b74816
4 changed files with 36 additions and 7 deletions

View File

@@ -6115,7 +6115,8 @@ Please submit there instead, or use --nodevelproject to force direct submission.
# it seems to be an architecture in general
arg_arch = arg
if not (arg == osc.build.hostarch or arg in osc.build.can_also_build.get(osc.build.hostarch, [])):
print("WARNING: native compile is not possible, an emulator must be configured!")
if not (vm_type == 'qemu' or vm_type == 'emulator'):
print("WARNING: native compile is not possible, a emulator via binfmt misc handler must be configured!")
elif not arg_repository:
arg_repository = arg
else:
@@ -6439,6 +6440,14 @@ Please submit there instead, or use --nodevelproject to force direct submission.
if project == opts.alternative_project:
opts.alternative_project = None
if len(args) == 0:
# build env not specified, just read from last build attempt
lastbuildroot = store_read_last_buildroot(os.curdir)
if lastbuildroot:
args = [ lastbuildroot[0], lastbuildroot[1] ]
if not opts.vm_type:
opts.vm_type = lastbuildroot[2]
args = self.parse_repoarchdescr(args, opts.noinit or opts.offline, opts.alternative_project, False, opts.vm_type, opts.multibuild_package)
if not opts.local_package: