salt/return-the-expected-powerpc-os-arch-bsc-1117995.patch
Pablo Suárez Hernández 34c4e47c9b - Avoid explicit reading of /etc/salt/minion (bsc#1220357)
- Allow NamedLoaderContexts to be returned from loader
- Revert the change making reactor less blocking (bsc#1230322)
- Use --cachedir for extension_modules in salt-call (bsc#1226141)
- Prevent using SyncWrapper with no reason
- Added:
  * avoid-explicit-reading-of-etc-salt-minion-bsc-122035.patch
  * allow-namedloadercontexts-to-be-returned-from-loader.patch
  * revert-the-change-making-reactor-less-blocking-bsc-1.patch
  * use-cachedir-for-extension_modules-in-salt-call-bsc-.patch
  * prevent-using-syncwrapper-with-no-reason.patch

OBS-URL: https://build.opensuse.org/package/show/systemsmanagement:saltstack/salt?expand=0&rev=259
2024-09-25 12:19:39 +00:00

32 lines
991 B
Diff

From ceaf42a67d21cb6fa723339559c85be969e67308 Mon Sep 17 00:00:00 2001
From: Mihai Dinca <mdinca@suse.de>
Date: Thu, 13 Dec 2018 12:17:35 +0100
Subject: [PATCH] Return the expected powerpc os arch (bsc#1117995)
---
salt/utils/pkg/rpm.py | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/salt/utils/pkg/rpm.py b/salt/utils/pkg/rpm.py
index f9975f8dff..147447ba75 100644
--- a/salt/utils/pkg/rpm.py
+++ b/salt/utils/pkg/rpm.py
@@ -69,9 +69,10 @@ def get_osarch():
stderr=subprocess.PIPE,
).communicate()[0]
else:
- ret = "".join([x for x in platform.uname()[-2:] if x][-1:])
-
- return salt.utils.stringutils.to_str(ret).strip() or "unknown"
+ ret = "".join(list(filter(None, platform.uname()[-2:]))[-1:])
+ ret = salt.utils.stringutils.to_str(ret).strip() or "unknown"
+ ARCH_FIXES_MAPPING = {"powerpc64le": "ppc64le"}
+ return ARCH_FIXES_MAPPING.get(ret, ret)
def check_32(arch, osarch=None):
--
2.39.2