1
0
mirror of https://github.com/openSUSE/osc.git synced 2024-12-30 19:56:14 +01:00

Merge pull request #689 from adrianschroeter/hostarch_check

disable hostarch check for emulator builds entirely
This commit is contained in:
Marco Strigl 2019-12-02 14:09:07 +01:00 committed by GitHub
commit 7625a708cb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -866,13 +866,14 @@ def main(apiurl, opts, argv):
# real arch of this machine # real arch of this machine
# vs. # vs.
# arch we are supposed to build for # arch we are supposed to build for
if bi.hostarch != None: if vm_type != "emulator" and vm_type != "qemu":
if hostarch != bi.hostarch and not bi.hostarch in can_also_build.get(hostarch, []): if bi.hostarch != None:
print('Error: hostarch \'%s\' is required.' % (bi.hostarch), file=sys.stderr) if hostarch != bi.hostarch and not bi.hostarch in can_also_build.get(hostarch, []):
return 1 print('Error: hostarch \'%s\' is required.' % (bi.hostarch), file=sys.stderr)
elif hostarch != bi.buildarch and vm_type != "emulator" and vm_type != "qemu": return 1
if not bi.buildarch in can_also_build.get(hostarch, []): elif hostarch != bi.buildarch:
print('WARNING: It is guessed to build on hostarch \'%s\' for \'%s\' via QEMU user emulation.' % (hostarch, bi.buildarch), file=sys.stderr) if not bi.buildarch in can_also_build.get(hostarch, []):
print('WARNING: It is guessed to build on hostarch \'%s\' for \'%s\' via QEMU user emulation.' % (hostarch, bi.buildarch), file=sys.stderr)
rpmlist_prefers = [] rpmlist_prefers = []
if prefer_pkgs: if prefer_pkgs: