Bug 220953 - [PATCH]: Add better support for the multitude of sparc arches
[PATCH]: Add better support for the multitude of sparc arches
Status: CLOSED UPSTREAM
Product: Fedora
Classification: Fedora
Component: yum (Show other bugs)
rawhide
sparc Linux
medium Severity medium
: ---
: ---
Assigned To: Jeremy Katz
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2006-12-29 10:42 EST by Dennis Gilmore
Modified: 2014-01-21 17:56 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2007-01-03 13:13:55 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
add sparc support (3.26 KB, patch)
2006-12-29 10:42 EST, Dennis Gilmore
no flags Details | Diff
Try to fix sparc handling (2.55 KB, patch)
2006-12-30 01:39 EST, Tom "spot" Callaway
no flags Details | Diff

  None (edit)
Description Dennis Gilmore 2006-12-29 10:42:07 EST
Description of problem:
yum on sparc doesnt return the list of supported arches properly the attached 
patch fixes that.  it was created against cvs head  and was sent to the yum 
list also.   it may not be pretty  but does the job.

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:
Comment 1 Dennis Gilmore 2006-12-29 10:42:07 EST
Created attachment 144548 [details]
add sparc support
Comment 2 Tom "spot" Callaway 2006-12-29 21:14:39 EST
Does this actually work? Because it looks rather incorrect to me. :/
Comment 3 Dennis Gilmore 2006-12-29 22:54:38 EST
seems to work perhaps we shouldnt return sparc64 in the sparcv8 and sparcv9 
list. it detects sparcv8 sparcv9 and sparcv9v properly

Python 2.4.3 (#1, Oct 24 2006, 17:21:19)
[GCC 4.1.1 20060802 (Red Hat 4.1.1-14)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import yum
>>> yum.rpmUtils.arch.getArchList('sparc')
['sparc', 'noarch']
>>> yum.rpmUtils.arch.getArchList('sparcv8')
['sparc64', 'sparcv8', 'sparc', 'noarch']
>>> yum.rpmUtils.arch.getArchList('sparcv9')
['sparc64', 'sparcv9', 'sparcv8', 'sparc', 'noarch']
>>> yum.rpmUtils.arch.getArchList('sparcv9v')
['sparc64v', 'sparc64', 'sparcv9v', 'sparcv9', 'sparcv8', 'sparc', 'noarch']
>>> yum.rpmUtils.arch.getArchList('sparc64')
['sparc64', 'sparcv9', 'sparcv8', 'sparc', 'noarch']
>>> yum.rpmUtils.arch.getArchList('sparc64v')
['sparc64v', 'sparc64', 'sparcv9v', 'sparcv9', 'sparcv8', 'sparc', 'noarch']
Comment 4 Tom "spot" Callaway 2006-12-30 01:39:14 EST
Created attachment 144574 [details]
Try to fix sparc handling

This is the behavior we want:

>>> import yum
>>> yum.rpmUtils.arch.getArchList('sparc')
['sparc', 'noarch']
>>> yum.rpmUtils.arch.getArchList('sparcv8')
['sparcv8', 'sparc', 'noarch']
>>> yum.rpmUtils.arch.getArchList('sparcv9')
['sparcv9', 'sparcv8', 'sparc', 'noarch']
>>> yum.rpmUtils.arch.getArchList('sparcv9v')
['sparcv9v', 'sparcv9', 'sparcv8', 'sparc', 'noarch']
>>> yum.rpmUtils.arch.getArchList('sparc64')
['sparc64', 'sparcv9', 'sparcv8', 'sparc', 'noarch']
>>> yum.rpmUtils.arch.getArchList('sparc64v')
['sparc64v', 'sparc64', 'sparcv9v', 'sparcv9', 'sparcv8', 'sparc', 'noarch']

This attached patch gives us this behavior. Note that I have to do an ugly hack
in one place, because sparc64v needs to have both sparc64 and sparcv9v
inherited, and python is only letting us get one. Someone with more python
skill than me could probably figure out the right way to get the proper
chaining without this hack. (sparc64 doesn't get sparcv9v, and sparcv9v doesn't
get sparc64, but sparc64v gets both)

Now, to be fair, I'm still not sure I have this 100% right:

bash-3.1# python
Python 2.4.3 (#1, Oct 25 2006, 12:47:51) 
[GCC 4.1.1 20060802 (Red Hat 4.1.1-14)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import yum
>>>
yum.rpmUtils.arch.getBestArchFromList(["sparc64v","sparc64","sparcv9v","sparcv9"])

'sparc64v'
>>> 
bash-3.1# sparc32 python
Python 2.4.3 (#1, Oct 25 2006, 12:47:51) 
[GCC 4.1.1 20060802 (Red Hat 4.1.1-14)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import yum
>>>
yum.rpmUtils.arch.getBestArchFromList(["sparc64v","sparc64","sparcv9v","sparcv9"])

'sparcv9v'

Is this what we want it to say in the default case? (user types yum on a
sparc64 system). I'm not sure.
Comment 5 Seth Vidal 2007-01-02 00:30:21 EST
When y'all get this sorted as to how you think it should be, let me know, okay?
Comment 6 Dennis Gilmore 2007-01-02 10:48:17 EST
spots way is correct 
Comment 7 Jeremy Katz 2007-01-03 13:13:55 EST
Committed spot's patch upstream on HEAD and 3.0.x so it'll be in 3.0.3 which
will likely be out the end of the week.

Note You need to log in before you can comment on or make changes to this bug.