Newbie question with Smart
Anders F Björklund
afb at algonet.se
Sun Jul 24 07:02:31 PDT 2011
Sriram Narayanan wrote:
> Hi Anders, thanks for the tips. I got this working now.
Glad to hear... (saw your post)
> I had to place "i86pc-pc-Solaris" in /etc/rpm/platform (I'm using a 32
> bit build for the time being).
The OS should probably be lowercase, and the vendor "something" ?
Typical values would be i686-redhat-linux or x86_64-apple-darwin,
so I would have expected a "i86pc-belenix-solaris" (or somesuch).
Whether it is "solaris" or "opensolaris", I don't really know...
(guess it's a similar discussion to "linux" vs "linux-gnu" etc)
Arch is up to you, I know that OpenPKG is using "ix86" for theirs.
>>
>>> I've added a channel, and am able to run an update, but I'm unable to
>>> install the package. What should I investigate ?
>>
>> You should look into that "rpm.archscore" returns something
>> for the package. Otherwise it won't be added to the channel:
>>
>> $ python
>>>>> import rpm
>>>>> rpm.archscore("i86pc")
>> 0
>>
>
> Yes, I get this very output, but I don't know what it means. I need to
> study rpm internals and read the docs better!
A score of 0 means incompatible, otherwise lower is "better".
The score is used in two places, the first is to reject all
packages with a score of zero to cut down on the number (?).
if rpm.archscore(arch) == 0:
continue
The second is for sorting packages with the same version, so
that the "best" arch package for the platform is selected.
if rc == 0:
rc = -cmp(archscore(selfarch), archscore(otherarch))
You will find the actual definition of the score within RPM.
>> If you are running rpm5, you need to set up /etc/rpm/platform
>> since that is what it is using to determine platform "score":
>>
>> rpm --eval "%{_arch}-%{_vendor}-%{_os}%{?_gnu}"
>> # See also https://bugs.launchpad.net/smart/+bug/587448
>>
>
> As noted above:
>
> I had to place "i86pc-pc-Solaris" in /etc/rpm/platform (I'm using a 32
> bit build for the time being).
The "i86pc" is pretty non-standard, but already in place for
debs (it links to "i386" deb packages, ditto sunos5 -> solaris)
The main issue in that bug was that the %_gnu value is ignored,
which only matters on ARM after the introduction of -gnueabi...
--anders
More information about the Smart
mailing list