2020-04-07 14:14:01 +02:00
|
|
|
From 27e90d416b89ac2c7839e1d03ded37f86df7290f Mon Sep 17 00:00:00 2001
|
2019-01-17 10:18:02 +01:00
|
|
|
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)
|
|
|
|
|
|
|
|
---
|
2020-04-07 14:14:01 +02:00
|
|
|
salt/utils/pkg/rpm.py | 9 ++++++---
|
|
|
|
1 file changed, 6 insertions(+), 3 deletions(-)
|
2019-01-17 10:18:02 +01:00
|
|
|
|
|
|
|
diff --git a/salt/utils/pkg/rpm.py b/salt/utils/pkg/rpm.py
|
2020-04-07 14:14:01 +02:00
|
|
|
index bc5eb30eda..cb85eb99fe 100644
|
2019-01-17 10:18:02 +01:00
|
|
|
--- a/salt/utils/pkg/rpm.py
|
|
|
|
+++ b/salt/utils/pkg/rpm.py
|
2020-04-07 14:14:01 +02:00
|
|
|
@@ -52,9 +52,12 @@ def get_osarch():
|
|
|
|
stdout=subprocess.PIPE,
|
2019-01-17 10:18:02 +01:00
|
|
|
stderr=subprocess.PIPE).communicate()[0]
|
|
|
|
else:
|
2020-04-07 14:14:01 +02:00
|
|
|
- ret = ''.join([x for x in platform.uname()[-2:] if x][-1:])
|
2019-01-17 10:18:02 +01:00
|
|
|
-
|
|
|
|
- return salt.utils.stringutils.to_str(ret).strip() or 'unknown'
|
2020-04-07 14:14:01 +02:00
|
|
|
+ ret = ''.join(list(filter(None, platform.uname()[-2:]))[-1:])
|
2019-01-17 10:18:02 +01:00
|
|
|
+ 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):
|
|
|
|
--
|
2019-11-28 16:41:55 +01:00
|
|
|
2.16.4
|
2019-01-17 10:18:02 +01:00
|
|
|
|
|
|
|
|