rpm: Properly detect other ARMv7 (32 Bit) arches

Like it is currently being done for the different
x86 arches (i386, i486, ...).
This commit is contained in:
Marius Hoch 2021-10-04 15:46:18 +02:00 committed by Megan Wilhite
parent 4b6372572c
commit 597b630c60

View file

@ -30,7 +30,16 @@ ARCHES_ALPHA = (
"alphaev68",
"alphaev7",
)
ARCHES_ARM = ("armv5tel", "armv5tejl", "armv6l", "armv7l", "aarch64")
ARCHES_ARM_32 = (
"armv5tel",
"armv5tejl",
"armv6l",
"armv6hl",
"armv7l",
"armv7hl",
"armv7hnl",
)
ARCHES_ARM_64 = ("aarch64",)
ARCHES_SH = ("sh3", "sh4", "sh4a")
ARCHES = (
@ -39,7 +48,8 @@ ARCHES = (
+ ARCHES_PPC
+ ARCHES_S390
+ ARCHES_ALPHA
+ ARCHES_ARM
+ ARCHES_ARM_32
+ ARCHES_ARM_64
+ ARCHES_SH
)
@ -66,11 +76,13 @@ def get_osarch():
def check_32(arch, osarch=None):
"""
Returns True if both the OS arch and the passed arch are 32-bit
Returns True if both the OS arch and the passed arch are x86 or ARM 32-bit
"""
if osarch is None:
osarch = get_osarch()
return all(x in ARCHES_32 for x in (osarch, arch))
return all(x in ARCHES_32 for x in (osarch, arch)) or all(
x in ARCHES_ARM_32 for x in (osarch, arch)
)
def pkginfo(name, version, arch, repoid, install_date=None, install_date_time_t=None):