Bug 220953 - [PATCH]: Add better support for the multitude of sparc arches
Summary: [PATCH]: Add better support for the multitude of sparc arches
Status: CLOSED UPSTREAM
Alias: None
Product: Fedora
Classification: Fedora
Component: yum   
(Show other bugs)
Version: rawhide
Hardware: sparc Linux
medium
medium
Target Milestone: ---
Assignee: Jeremy Katz
QA Contact:
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2006-12-29 15:42 UTC by Dennis Gilmore
Modified: 2014-01-21 22:56 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2007-01-03 18:13:55 UTC
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 15:42 UTC, Dennis Gilmore
no flags Details | Diff
Try to fix sparc handling (2.55 KB, patch)
2006-12-30 06:39 UTC, Tom "spot" Callaway
no flags Details | Diff

Description Dennis Gilmore 2006-12-29 15:42:07 UTC
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 15:42:07 UTC
Created attachment 144548 [details]
add sparc support

Comment 2 Tom "spot" Callaway 2006-12-30 02:14:39 UTC
Does this actually work? Because it looks rather incorrect to me. :/

Comment 3 Dennis Gilmore 2006-12-30 03:54:38 UTC
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 06:39:14 UTC
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 05:30:21 UTC
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 15:48:17 UTC
spots way is correct 

Comment 7 Jeremy Katz 2007-01-03 18:13:55 UTC
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.