[Yum-devel] RFC: yum+rpm ppc64p7 patches

Phil Knirsch pknirsch at redhat.com
Thu Apr 26 14:24:54 UTC 2012

On 04/18/2012 04:29 PM, James Antill wrote:
> On Wed, 2012-04-18 at 15:37 +0200, Phil Knirsch wrote:
>> Yea, it's kinda butt ugly, but the problem is that rpm doesn't have an
>> API for it, even less so for the python part that would be required.
>   Yeh, just seems that one of the bester cases here would be having an
> "rpm API" that says "give me the current AT_PLATFORM and/or AT_*".
>   Even if we don't move/merge "all" of the arch detection code into rpm,
> at least having those would be good.

The latest patch i've attached for now basically do the same as rpm 
does. Once we have the rpm API in place we can switch over to that 
easily. Basically replaced the evil /bin/true ENV parsing hack with a 
proper general purpose /proc/self/auxv parser in python directly, so 
basically the cleanest way we can do this for now. And i've done it just 
like in rpm, so any other arch can access and use the 
aux_vector["platform"] and aux_vector["hwcap"] information.

>> The latest patch version for rpm at least does it in a decently sane way
>> where a struct is being populated with AT_PLATFORM and AT_HWCAPS
>> information to be used for defaultMachine() stuff.
>> The other 2 options are to either look at /proc/cpuinfo or to use ENV
>> where at the end the AT stuff is being "injected", but the IBM folks
>> strongly recommended not to use the former
>   Do they say why they don't want us looking in cpuinfo? We do that on
> most arches anyway ... I just know anaconda/mock/pungi/something is
> going to barf when we have to start running other programs.

Yep, see my earlier comment, i completely nuked that and reading cpuinfo 
would have been incorrect, so i just went the extra mile to do a proper 
general purpose auxv parser.

That also makes the second part a lot cleaner and easier to read and 
i've fixed it to check if it's power7 or higher properly as well.

So we should be pretty much en par with the changes in rpm now as they 
are very similar solved in both now.

Could we get a f-17 version with that change out soon too please? rpm 
already contains the necessary changes, and we'd really love to get this 
test for F-17 beta on PPC which we're aiming for next Wednesday.

Thanks & regards, Phil

Philipp Knirsch              | Tel.:  +49-711-96437-470
Supervisor Core Services     | Fax.:  +49-711-96437-111
Red Hat GmbH                 | Email: Phil Knirsch <pknirsch at redhat.com>
Hauptstaetterstr. 58         | Web:   http://www.redhat.com/
D-70178 Stuttgart, Germany
-------------- next part --------------
A non-text attachment was scrubbed...
Name: yum-3.4.3-ppc64p7.patch
Type: text/x-patch
Size: 2857 bytes
Desc: not available
URL: <http://lists.baseurl.org/pipermail/yum-devel/attachments/20120426/96e1be1a/attachment.bin>

More information about the Yum-devel mailing list