Richard Biener
On Thu, 11 Aug 2022, Dan Čermák wrote:
Richard Biener
writes: [..]
The suggestion of multiple repositories is just one possible technical implementation of such annotation, using system provides and package requires would be another (then with the technical issue of having multiple same named but different filenamed packages in the same repository?).
[OT] Why requires though? I don't think it's a good idea to explicitly require a library with a certain instruction set. Provides on the other hand would be a workaround, but I really think that architectures are the proper way how this should be handled.
To elaborate, the "system" would have a Provides: hw-x86_64-version = 3 for example and a package built for x86_64-v2 would then have a Requires: hw-x86_64-version >= 2. The Provides would be magically added upon install time somehow (thus "system provides").
You will not get around adding some logic to rpm itself, because you can
unplug your harddrive and put it into a new PC or deploy a base image to
a bunch of new PCs. Then the base package that provides your hardware
capabilities is no longer valid, so I think this really must be
generated by rpm itself[1]. But going via Provides/Requires does not sound
like such a bad idea, as it could be used to add even more granularity,
e.g. requiring only AVX512 or FMA3.
Cheers,
Dan
Footnotes:
[1] and yes, I know that if you "downgrade" your CPU, you'll run into
huge problems anyway…
--
Dan Čermák