more debugging and added is_arm64 to utils platform

This commit is contained in:
David Murphy 2024-08-07 11:03:02 -06:00 committed by Daniel Wozniak
parent b3f2325645
commit ce881d54fb
2 changed files with 24 additions and 3 deletions

View file

@ -231,6 +231,23 @@ def is_aarch64():
return platform.machine().startswith("aarch64")
@real_memoize
def is_arm64():
"""
Simple function to return if host is Arm64 or not
"""
return platform.machine().startswith("arm64")
## DGM Debugging
@real_memoize
def dgm_machine():
"""
Simple function to return what machine string, debug purpose only
"""
return platform.machine()
def spawning_platform():
"""
Returns True if multiprocessing.get_start_method(allow_none=False) returns "spawn"

View file

@ -837,9 +837,9 @@ class SaltPkgInstall:
self._install_ssm_service()
elif platform.is_darwin():
if relenv and platform.is_aarch64():
if relenv and platform.is_arm64():
arch = "arm64"
elif platform.is_aarch64() and self.classic:
elif platform.is_arm64() and self.classic:
arch = "arm64"
else:
arch = "x86_64"
@ -862,7 +862,11 @@ class SaltPkgInstall:
dgm_relenv = False
print(
f"DGM test/support/pkg for darwin, relenv '{dgm_relenv}', is_aarchc64 '{platform.is_aarch64()}', classic '{self.classic}', arch '{arch}', mac_pkg '{mac_pkg}', mac_pkg_url '{mac_pkg_url}'",
f"DGM test/support/pkg for darwin, machine string '{platform.dgm_machine()}'",
flush=True,
)
print(
f"DGM test/support/pkg for darwin, relenv '{dgm_relenv}', is_aarch64 '{platform.is_aarch64()}', is_arm64 '{platform.is_arm64()}', classic '{self.classic}', arch '{arch}', mac_pkg '{mac_pkg}', mac_pkg_url '{mac_pkg_url}'",
flush=True,
)