CPU Arch Detection

Pasi Pirhonen upi at iki.fi
Sun Oct 23 18:11:45 UTC 2005


Hi,


On Sun, Oct 23, 2005 at 09:13:24PM +0400, Sergey Tikhonov wrote:
> 
> Ok, here are findings (Mike thank you for access to ev6 machine).
> The rpm tries to take value for _host_cpu variable from 
> /etc/rpm/platform file (it contains machine-vendor-os triplet).
> As other mentioned here the file itself is created by anaconda (I didn't 
> know that).
> If the file doesn't exist - the rpm uses "uname" call and then tries to 
> use implver and amask to find out exact cpu type
> and sets _host_cpu variable. So, rpm works correctly - it is just a 
> matter corretly create /etc/rpm/platform file. :)

I think (i was actually tracing it a bit too) it's rhpl which is giving
anaconda the arch/canonarch values for writing the /etc/rpm/platform.
There seems to be quite a lot odd hacks already for different
platforms, so few more for different alpha platforms would not hurt
anymore _more_.

for example

/usr/lib/anaconda/iutil.py defines it like

myarch = rhpl.arch.canonArch

and that

/usr/lib/python2.3/site-packages/rhpl/arch.py

has all kind of weird hacks already in it (among few mods to make alpha
work at all with anaconda).

For alpha it's not that bad when the /etc/rpm/platform would precent
something else than <basearc>-redhat-linux, but there might be side
effects on that area too.

At least when sparc64 is running 64bit kernel and 32bit userspace,
there is obviously sparc64-redhat-linux in /etc/rpm/platform. This has
some side effects when trying to rebuild --target sparc. %_lib tends to
translate to /lib64/ so it wont' work as expected. This is NOT related
to alpha. It's just example of that there might be something more side
effects with this /etc/rpm/platform


-- 
Pasi Pirhonen - upi at iki.fi - http://iki.fi/upi/




More information about the axp-list mailing list