From d26b3df32fc0a13be2ce785cbcbaea0c9a5d174a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adrian=20Schr=C3=B6ter?= Date: Mon, 11 Feb 2013 15:35:15 +0100 Subject: [PATCH] - handle architecture parsing also right when an emulator is used. Just warn in that case, because we can check for sure if an emulator is configured. --- osc/build.py | 2 +- osc/commandline.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/osc/build.py b/osc/build.py index 6208e81b..531b2634 100644 --- a/osc/build.py +++ b/osc/build.py @@ -654,7 +654,7 @@ def main(apiurl, opts, argv): elif hostarch != bi.buildarch: if not bi.buildarch in can_also_build.get(hostarch, []): # OBSOLETE: qemu_can_build should not be needed anymore since OBS 2.3 - if vm_type != "emulator" and not bi.buildarch in qemu_can_build + system_emulator_can_build: + if vm_type != "emulator" and not bi.buildarch in qemu_can_build: print >>sys.stderr, 'Error: hostarch \'%s\' cannot build \'%s\'.' % (hostarch, bi.buildarch) return 1 print >>sys.stderr, 'WARNING: It is guessed to build on hostarch \'%s\' for \'%s\' via QEMU.' % (hostarch, bi.buildarch) diff --git a/osc/commandline.py b/osc/commandline.py index 8db214bb..8de6b4cf 100644 --- a/osc/commandline.py +++ b/osc/commandline.py @@ -5100,10 +5100,10 @@ Please submit there instead, or use --nodevelproject to force direct submission. if arg.endswith('.spec') or arg.endswith('.dsc') or arg.endswith('.kiwi') or arg == 'PKGBUILD': arg_descr = arg else: - if (arg in osc.build.can_also_build.get(osc.build.hostarch, []) - or arg in osc.build.qemu_can_build - or arg in osc.build.hostarch) and arg_arch is None: + if osc.build.can_also_build.get(arg) != None and arg_arch is None: arg_arch = arg + if not (arg in osc.build.can_also_build.get(osc.build.hostarch, []) or arg in osc.build.hostarch): + print "WARNING: native compile is not possible, an emulator must be configured!" elif not arg_repository: arg_repository = arg else: