From mboxrd@z Thu Jan 1 00:00:00 1970 From: upi at iki.fi (Pasi Pirhonen) Date: Sun, 23 Oct 2005 21:11:45 +0300 Subject: CPU Arch Detection In-Reply-To: <435BC4B4.2030204@solvo.ru> References: <435A2642.1010501@grouse.net.au> <20051022174004.GI862@core.upi.iki.fi> <435A868D.1070506@solvo.ru> <20051022185043.GA5018@ellpspace.math.ualberta.ca> <435A9041.3080605@solvo.ru> <435BC4B4.2030204@solvo.ru> Message-ID: <20051023181145.GM862@core.upi.iki.fi> 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 -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/