rpm.archscore's influence on smart
Anders F Björklund
afb at algonet.se
Tue Mar 23 06:59:38 PDT 2010
Eric MSP Veith wrote:
> I'm having a problem with rpm's .archscore which I don't quite
> understand.
>
> Normally, I have only repos of type rpm-dir which contain either
> i686 or
> noarch packages. To save me from the heavy burden ;-) of appending --
> target=i686-whatever-linux every time I run rpmbuild, I created
> /etc/rpm/platform with i686-slackware-linux.
>
> rpm.archscore("i686") returns 1 then, and 0 for every other
> architecture,
> which is right.
Sounds reasonable.
I normally put `rpm --eval='%{_target_platform}'` as the first,
and then one extra line for secondary arches and one for noarch.
> Yesterday I added the YUM repo of go-oo to install OpenOffice.
> Packages
> there are built for i586 and didn't show up at first due to the
> contents of
> /etc/rpm/platform.
Right, it also needs a i586 line (and maybe i486, i386 as well).
It's different with rpm5, where it uses platformScore underneath.
But RPM, not Smart.
> Until here I understand, there rest I don't:
>
> Removing /etc/rpm/platform makes the packages in the Go-OO YUM repo
> show up,
> but hides all i686 and noarch packages from the rpm-dir repositories.
> archscore() returns 0 for all architectures then.
>
> Putting "i[56]86-slackware-linux" into /etc/rpm/platform leads to
> rpm.archscore() returning 0 for every architecture I query. Still,
> the Go-OO
> packages (i586) show up, while the rpm-dir repositories show no
> packages
> anymore, not even the "noarch" ones.
>
> Putting more than one line into /etc/rpm/platform causes smart to
> segfault.
> :-/
That's an rpm-python bug then, it sounds like ?
Or does "rpm.archscore" work, and smart crash ?
> Can somebody explain Smart's behaviour to me, and how I can use both
> repositories (the Go-OO with i586 and my rpm-dir reposoitories with
> i686
> packages)?
>
> Thanks alot in advance.
Smart just uses whatever rpm.archscore() returns...
python -c 'import rpm; print rpm.archscore("i586")'
>
--anders
More information about the Smart
mailing list