From 5324c6441fb0b424fee66d31128762fb80ee9b54 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lubom=C3=ADr=20Sedl=C3=A1=C5=99?= Date: Wed, 16 May 2018 15:22:31 +0200 Subject: [PATCH] arch: Make i386 map to i686 instead of athlon MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This is used for mapping basearch to binary arch. One use for this is when running depsolving to tell yum/dnf what arch to work with. With this change it will get i686 instead of athlon when working on i386 basearch. The other use case is finding arches compatible with given basearch. The change will remove athlon from the list for i386. Signed-off-by: Lubomír Sedlář --- pungi/arch.py | 2 +- tests/test_arch.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pungi/arch.py b/pungi/arch.py index ab121d99..edd33e19 100644 --- a/pungi/arch.py +++ b/pungi/arch.py @@ -17,7 +17,7 @@ from .arch_utils import arches as ALL_ARCHES from .arch_utils import getBaseArch, getMultiArchInfo, getArchList TREE_ARCH_YUM_ARCH_MAP = { - "i386": "athlon", + "i386": "i686", "ppc64": "ppc64p7", "sparc": "sparc64v", "arm": "armv7l", diff --git a/tests/test_arch.py b/tests/test_arch.py index af1b80f9..2ecfa4e8 100644 --- a/tests/test_arch.py +++ b/tests/test_arch.py @@ -17,13 +17,13 @@ class TestArch(unittest.TestCase): def test_i386(self): arches = get_valid_arches("i386") - self.assertEqual(arches, ['athlon', 'i686', 'i586', 'i486', 'i386', 'noarch']) + self.assertEqual(arches, ['i686', 'i586', 'i486', 'i386', 'noarch']) arches = get_valid_arches("i386", multilib=False) - self.assertEqual(arches, ['athlon', 'i686', 'i586', 'i486', 'i386', 'noarch']) + self.assertEqual(arches, ['i686', 'i586', 'i486', 'i386', 'noarch']) arches = get_valid_arches("i386", add_src=True) - self.assertEqual(arches, ['athlon', 'i686', 'i586', 'i486', 'i386', 'noarch', 'src']) + self.assertEqual(arches, ['i686', 'i586', 'i486', 'i386', 'noarch', 'src']) def test_x86_64(self): arches = get_valid_arches("x86_64")