Red Hat Bugzilla – Bug 569946
solaris2mpm assertionError: Unknown arch x86 when converting Solaris patch 10_x86_Recommended
Last modified: 2016-07-03 20:54:52 EDT
Created attachment 397394 [details]
Description of problem:
Found this issue while looking into bug 559092 - solaris2mpm fails if architecture is specified as "x86". It should be mapped to "i386", similar to "intel", "i86pc", "i386.i86pc", and "i386 i386.i86pc".
Version-Release number of selected component (if applicable):
Red Hat Network (RHN) Satellite 5.3.0
Steps to Reproduce:
1. Have a satellite with solaris enabled.
2. Download and try to convert sun patch cluster for x86, e.g.,
# zip -q -r 10_x86_Recommended.zip 10_x86_Recommended && solaris2mpm --tempdir=/tmp/tmp/ 10_x86_Recommended.zip
Opening archive, this may take a while
Error creating mpm for /tmp/10_x86_Recommended.zip:
Traceback (most recent call last):
File "/usr/share/rhn/rhnpush/solaris2mpm.py", line 204, in _run
patch_mpm = create_patch_mpm(archive_parser, prefix=dir)
File "/usr/share/rhn/rhnpush/solaris2mpm.py", line 358, in create_patch_mpm
dct = parse_patch_readme(readme)
File "/usr/share/rhn/rhnpush/solaris2mpm.py", line 713, in parse_patch_readme
dct['target_arch'] = _normalize_arch(dct['target_arch'])
File "/usr/share/rhn/rhnpush/solaris2mpm.py", line 970, in _normalize_arch
if __debug__: assert arch in ("i386", "sparc", "noarch"), "Unknown arch %s" % arch
AssertionError: Unknown arch x86
No error, solaris2mpm succeeds in converting all patches.
Proposed patch attached.
Commited to spacewalk.git as d71dab20e42b8794c037d89578a9170597bf7095
Cherry picked to satellite.git as 3771ecb1b31474dd3967624bad04fefd09e550e0
Technical note added. If any revisions are required, please edit the "Technical Notes" field
accordingly. All revisions will be proofread by the Engineering Content Services team.
The solaris2mpm utility now recognizes both "x86" and "X86" as valid architecture strings.