from gbp.rpm.git import GitRepositoryError, RpmGitRepository
CHANGE_PERSONALITY = {
+ 'ia32': 'linux32',
'i686': 'linux32',
'i586': 'linux32',
'i386': 'linux32',
}
BUILDARCHMAP = {
- 'x86_64': 'x86_64',
- 'ia32': 'i586',
- 'i686': 'i586',
- 'i586': 'i586',
- 'i386': 'i586',
+ 'ia32': 'i686',
+ 'i586': 'i686',
+ 'i386': 'i686',
}
SUPPORTEDARCHS = [
'ia32',
'i686',
'i586',
+ 'i386',
+ 'armv6l',
'armv7hl',
'armv7el',
'armv7tnhl',
except ValueError:
return 1
-def get_hostarch():
- """
- get arch of host
- """
- hostarch = os.uname()[4]
- if hostarch == 'i686':
- hostarch = 'i586'
- return hostarch
-
def find_binary_path(binary):
"""
return full path of specified binary file
msger.error("git project can't be found for --spec, "
"give it in argument or cd into it")
- hostarch = get_hostarch()
+ hostarch = os.uname()[4]
if args.arch:
buildarch = args.arch
else:
buildarch = hostarch
msger.info('No arch specified, using system arch: %s' % hostarch)
- if buildarch in BUILDARCHMAP:
- buildarch = BUILDARCHMAP[buildarch]
if not buildarch in SUPPORTEDARCHS:
msger.error('arch %s not supported, supported archs are: %s ' % \
(buildarch, ','.join(SUPPORTEDARCHS)))
+ if buildarch in BUILDARCHMAP:
+ buildarch = BUILDARCHMAP[buildarch]
+
if buildarch not in CAN_ALSO_BUILD.get(hostarch, []):
if buildarch not in QEMU_CAN_BUILD:
msger.error('hostarch: %s can\'t build target arch %s' % \