From mboxrd@z Thu Jan 1 00:00:00 1970 From: tsv at solvo.ru (Sergey Tikhonov) Date: Sun, 23 Oct 2005 21:13:24 +0400 Subject: CPU Arch Detection In-Reply-To: <435A9041.3080605@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> Message-ID: <435BC4B4.2030204@solvo.ru> Sergey Tikhonov wrote: > Michal Jaegermann wrote: > >> On Sat, Oct 22, 2005 at 10:35:57PM +0400, Sergey Tikhonov wrote: >> >> >>> The above "arch_compat" macros says that "alpha" packages can be >>> installed on "alphaev6" arch not the way around. >>> >> >> >> Are you sure? 'athlon', for example, seems to follow a similar >> chain to 'i386' as 'alphaev6' to alpha and I do not recall ever >> seeing complaints that 'athlon', or 'i686', packages are of a wrong >> architecture for on an i386 installation. >> >> > Well, let me dig into my e-mails (on Monday). I was writing based on > my memory. > I recall I was working on that issue in January in preparation of AC1 > release, but was > not able to test it on real ev6 machine. It seemed that everything was > ready in rpm source > code and during debugging I fooled CPU detection code that I had ev6 > machine and ev6 package > installed without problems. I could take a look the issue again if I > had access to ev6 class machine > (Mike? :) ). 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 still believe that "arch_compat" macro defines upward compatibility and has meaning: alpha_compat: arch2: arch1 - that packages of arch1 can be installed on arch2 (try to comment out the line with "noarch" dependency and install noarch package and rpm would reject to install noarch package). Regards, Sergey. tsv at solvo.ru