dede5bd1d4
OBS-URL: https://build.opensuse.org/package/show/systemsmanagement:saltstack/salt?expand=0&rev=166
34 lines
1.0 KiB
Diff
34 lines
1.0 KiB
Diff
From 27e90d416b89ac2c7839e1d03ded37f86df7290f 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 | 9 ++++++---
|
|
1 file changed, 6 insertions(+), 3 deletions(-)
|
|
|
|
diff --git a/salt/utils/pkg/rpm.py b/salt/utils/pkg/rpm.py
|
|
index bc5eb30eda..cb85eb99fe 100644
|
|
--- a/salt/utils/pkg/rpm.py
|
|
+++ b/salt/utils/pkg/rpm.py
|
|
@@ -52,9 +52,12 @@ def get_osarch():
|
|
stdout=subprocess.PIPE,
|
|
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.16.4
|
|
|
|
|