Description of problem: Asking for basearch of 'armhfp' throws an exception. Version-Release number of selected component: Current master branch. How reproducible: Always. Steps to Reproduce: >>> import dnf.rpm >>> dnf.rpm.basearch('armhfp') Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/lib/python2.7/site-packages/dnf/rpm/__init__.py", line 107, in basearch return _BASEARCH_MAP[arch] KeyError: 'armhfp' Actual results: It throws an exception. Expected results: It should return 'armhfp'. Additional info: Yum returns 'armhfp' in this case: >>> import rpmUtils.arch >>> rpmUtils.arch.getBaseArch('armhfp') 'armhfp'
Unfortunately, armhfp is not architecture, but base-architecture.. in yum it worked because: if myarch not in arches: # this is dumb, but <shrug> return myarch There are couple of options.. 1) You catch KeyError and set your string (which is what yum actually does) 2) We can return same string if it's base-arch we know about 3) We can define some exception which you can catch instead of KeyError 4) You do something different ;) If you think that 1) or 4) are not something what you want -- feel free to reopen bug.