mirror of
https://github.com/openSUSE/osc.git
synced 2024-11-10 06:46:15 +01:00
- fix the general architecture detection for incomplete "osc build" lines
This commit is contained in:
parent
b99233e3ae
commit
e1291fdcc6
@ -53,8 +53,6 @@ qemu_can_build = [ 'armv4l', 'armv5el', 'armv5l', 'armv6l', 'armv7l', 'armv6el',
|
||||
]
|
||||
|
||||
can_also_build = {
|
||||
'aarch64':['aarch64'],
|
||||
'armv4l': [ 'armv4l' ],
|
||||
'armv6l' :[ 'armv4l', 'armv5l', 'armv6l', 'armv5el', 'armv6el' ],
|
||||
'armv7l' :[ 'armv4l', 'armv5l', 'armv6l', 'armv7l', 'armv5el', 'armv6el', 'armv7el' ],
|
||||
'armv5el':[ 'armv4l', 'armv5l', 'armv5el' ], # not existing arch, just for compatibility
|
||||
@ -66,7 +64,6 @@ can_also_build = {
|
||||
'armv5tel':[ 'armv4l', 'armv5el', 'armv5tel' ],
|
||||
's390x': ['s390' ],
|
||||
'ppc64': [ 'ppc', 'ppc64' ],
|
||||
'sh4': [ 'sh4' ],
|
||||
'i586': [ 'i386' ],
|
||||
'i686': [ 'i586', 'i386' ],
|
||||
'x86_64': ['i686', 'i586', 'i386' ],
|
||||
|
@ -5112,14 +5112,21 @@ Please submit there instead, or use --nodevelproject to force direct submission.
|
||||
import glob
|
||||
arg_arch = arg_repository = arg_descr = None
|
||||
if len(args) < 3:
|
||||
# some magic, works only sometimes, but people seem to like it :/
|
||||
all_archs = []
|
||||
for mainarch in osc.build.can_also_build:
|
||||
all_archs.append(mainarch)
|
||||
for subarch in osc.build.can_also_build.get(mainarch):
|
||||
all_archs.append(subarch)
|
||||
for arg in args:
|
||||
if arg.endswith('.spec') or arg.endswith('.dsc') or arg.endswith('.kiwi') or arg == 'PKGBUILD':
|
||||
arg_descr = arg
|
||||
else:
|
||||
if (arg in osc.build.hostarch or osc.build.can_also_build.get(arg) != None) and arg_arch is None:
|
||||
if (arg == osc.build.hostarch or arg in all_archs) and arg_arch is None:
|
||||
# it seems to be an architecture in general
|
||||
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!")
|
||||
if not (arg in osc.build.can_also_build.get(osc.build.hostarch) or arg == osc.build.hostarch):
|
||||
print "WARNING: native compile is not possible, an emulator must be configured!"
|
||||
elif not arg_repository:
|
||||
arg_repository = arg
|
||||
else:
|
||||
|
Loading…
Reference in New Issue
Block a user