arch: Make i386 map to i686 instead of athlon

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ář <lsedlar@redhat.com>
This commit is contained in:
Lubomír Sedlář 2018-05-16 15:22:31 +02:00
parent 2862ae0b28
commit 5324c6441f
2 changed files with 4 additions and 4 deletions

View File

@ -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",

View File

@ -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")