Newbie question with Smart

Sriram Narayanan sriram at belenix.org
Fri Sep 2 10:20:24 PDT 2011


Hi Anders:

I'd somehow missed out on replying to this email.

On Sun, Jul 24, 2011 at 7:32 PM, Anders F Björklund <afb at algonet.se> wrote:
> 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.
>

There'll be some thinking needed by the Belenix team. We'll need to
arrive at something like x86_64-belenix-opensolaris or
x86_64-belenix-illumos.

>>>
>>>> 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.
>

Thanks for the explanation.

>>> 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...
>

This i86pc is how the x86 architecture is identified in the Solaris world.

We'll need to figure out what would be ideal and also not break
compatibility in the long run.

> --anders
>
>

-- Sriram

-- 
Belenix: www.belenix.org



More information about the Smart mailing list