Pekka Pietikainen wrote:
On Wed, Dec 01, 2004 at 11:10:04PM -0500, Jeff Johnson wrote:
>Prolly the strongest mechanism is to attach a run-time probe dependency to
>the "cpu(...)" name space and parse /proc/cpuinfo for the relevant info.
>That mostly works, but will have problems in chroot's w/o /proc mounted,
>and will be kinda weird if/when, say, the mobo or disk is moved amongst
>machines, to mention just 2 possible problems off the top of my head.
>
>I suspect those deficiencies can be lived with, and are no worse than
>existing arch based tests.
>
>
Would there be any compilications if the thing was generalized and
you could do Requires-Return-Code: /usr/lib/rpm/check-x86-cpu-flags cmov
(or whatever the syntax would be, basic idea is that there's some
external thing that exits with 0 or 1).
Well, not a script please, scripts break way too often to be reliable.
But yes, return codes like
0 == condition is TRUE
1 == condition is FALSE
from a function that is passed the {N,EVR,FLAGS} dependency triple which
is dispatched iff the 'cpu(...)' name space wrapper is detected.
Kinda like 'rpmlib(...)' tracking dependencies, which are also a
run-time probe dependency
wrapped in a name space.
In any case, such a thing should be easy to override, even when
using a frontend like yum.
Yep.
73 de Jeff