mirror of
https://github.com/saltstack/salt.git
synced 2025-04-16 09:40:20 +00:00
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:
parent
4b6372572c
commit
597b630c60
1 changed files with 16 additions and 4 deletions
|
@ -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):
|
||||
|
|
Loading…
Add table
Reference in a new issue