Bug 569946

Summary: solaris2mpm assertionError: Unknown arch x86 when converting Solaris patch 10_x86_Recommended
Product: Red Hat Satellite 5 Reporter: Xixi <xdmoon>
Component: SolarisAssignee: Miroslav Suchý <msuchy>
Status: CLOSED CURRENTRELEASE QA Contact: Martin Minar <mminar>
Severity: high Docs Contact:
Priority: high    
Version: 530CC: cperry, mkoci, mminar, mmraka, mosvald, msuchy, tao, xdmoon
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: rhnpush-5.3.1-6 Doc Type: Bug Fix
Doc Text:
The solaris2mpm utility now recognizes both "x86" and "X86" as valid architecture strings.
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-07-20 15:31:37 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 518253, 596147    
Attachments:
Description Flags
solaris2mpm.375873.TEST.1.patch none

Description Xixi 2010-03-02 19:04:57 UTC
Created attachment 397394 [details]
solaris2mpm.375873.TEST.1.patch

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

How reproducible:
Always.

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

Actual results:
Solaris 
Opening archive, this may take a while
Writing patch-cluster-solaris-10_x86_Recommended-20091207-1.i386-solaris-patch-cluster.mpm
Writing patch-solaris-113000-07-1.i386-solaris-patch.mpm
Writing patch-solaris-117435-02-1.i386-solaris-patch.mpm
...
Writing patch-solaris-125732-05-1.i386-solaris-patch.mpm
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

Expected results:
No error, solaris2mpm succeeds in converting all patches.

Additional info:
Proposed patch attached.

Comment 2 Miroslav Suchý 2010-05-03 11:57:39 UTC
Commited to spacewalk.git as d71dab20e42b8794c037d89578a9170597bf7095

Comment 3 Miroslav Suchý 2010-05-18 14:51:29 UTC
Cherry picked to satellite.git as 3771ecb1b31474dd3967624bad04fefd09e550e0

Comment 7 Jaromir Hradilek 2010-09-02 20:57:22 UTC
    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.
    
    New Contents:
The solaris2mpm utility now recognizes both "x86" and "X86" as valid architecture strings.