Blame SOURCES/0001-support-ppc64le-in-pyparted.patch

23f96d
From d8a1ed4a28dfb8541b95b3635660dfe18fa37a19 Mon Sep 17 00:00:00 2001
23f96d
From: root <hamzy@us.ibm.com>
23f96d
Date: Thu, 8 May 2014 15:32:51 -0500
23f96d
Subject: [PATCH 1/7] support ppc64le in pyparted
23f96d
23f96d
Add ppc64le support to pyparted
23f96d
---
23f96d
 src/parted/__init__.py      | 6 ++++--
23f96d
 tests/test_parted_parted.py | 1 +
23f96d
 2 files changed, 5 insertions(+), 2 deletions(-)
23f96d
23f96d
diff --git a/src/parted/__init__.py b/src/parted/__init__.py
23f96d
index 8208c75..ae7bc4b 100644
23f96d
--- a/src/parted/__init__.py
23f96d
+++ b/src/parted/__init__.py
23f96d
@@ -278,6 +278,8 @@ archLabels = {'i386': ['msdos', 'gpt'],
23f96d
               'sparc': ['sun'],
23f96d
               'ia64': ['msdos', 'gpt'],
23f96d
               'ppc': ['msdos', 'mac', 'amiga', 'gpt'],
23f96d
+              'ppc64': ['msdos', 'mac', 'amiga', 'gpt'],
23f96d
+              'ppc64le': ['msdos', 'gpt'],
23f96d
               'x86_64': ['msdos', 'gpt'],
23f96d
               'aarch64': ['msdos', 'gpt']}
23f96d
 
23f96d
@@ -313,9 +315,9 @@ def Deprecated(mod, deprecated={}):
23f96d
 __archLabels = (('amiga', 'ppc(64)?$'),
23f96d
                 ('bsd', 'alpha$'),
23f96d
                 ('dasd', 's390x?$'),
23f96d
-                ('gpt', 'i[3-6]86$|x86_64$|ia64$|ppc(64)?$|aarch64$'),
23f96d
+                ('gpt', 'i[3-6]86$|x86_64$|ia64$|ppc(64|64le)?$|aarch64$'),
23f96d
                 ('mac', 'ppc(64)?$'),
23f96d
-                ('msdos', 'i[3-6]86$|x86_64$|s390x?$|alpha$|ia64$|ppc(64)?$|aarch64$'),
23f96d
+                ('msdos', 'i[3-6]86$|x86_64$|s390x?$|alpha$|ia64$|ppc(64|64le)?$|aarch64$'),
23f96d
                 ('sun', 'sparc(64)?$'))
23f96d
 
23f96d
 def getLabels(arch=None):
23f96d
diff --git a/tests/test_parted_parted.py b/tests/test_parted_parted.py
23f96d
index 29aeb10..b2db935 100755
23f96d
--- a/tests/test_parted_parted.py
23f96d
+++ b/tests/test_parted_parted.py
23f96d
@@ -57,6 +57,7 @@ class GetLabelsTestCase(unittest.TestCase):
23f96d
         self.assertSetEqual(parted.getLabels('sparc64'), {'sun'})
23f96d
         self.assertSetEqual(parted.getLabels('ppc'), {'amiga', 'gpt', 'mac', 'msdos'})
23f96d
         self.assertSetEqual(parted.getLabels('ppc64'), {'amiga', 'gpt', 'mac', 'msdos'})
23f96d
+        self.assertSetEqual(parted.getLabels('ppc64le'), {'gpt', 'msdos'})
23f96d
         self.assertSetEqual(parted.getLabels('alpha'), {'bsd', 'msdos'})
23f96d
         self.assertSetEqual(parted.getLabels('ia64'), {'gpt', 'msdos'})
23f96d
         self.assertSetEqual(parted.getLabels('aarch64'), {'gpt', 'msdos'})
23f96d
-- 
23f96d
1.8.3.1
23f96d