Web lists-archives.com

Re: Exclude some architectures from an architecture-independent package ?

On 2019-05-29 7:39 p.m., Raphaël Halimi wrote:
> Le 29/05/2019 à 15:41, Ondřej Surý a écrit :
>> can’t you just “skip” building the module in DKMS when on unsupported architecture?
>> Install the package on that system would be noop then.
> Well, I was so focused on trying to make the package unavailable on
> non-ACPI architectures that I didn't think to explore this avenue.
> It's a good idea, and actually quite easy to implement, since I found
> after some research that DKMS supports a "BUILD_EXCLUSIVE_ARCH" option
> that can accept a regexp to match architectures to build for.
> I'll go this way, thanks a lot for your help.
> Regards,

If you can detect ACPI enabled kernels with a kernel config option, you
can have DKMS only build the modules when it's enabled. This way you
don't have to handle manual arch lists in DKMS or in the package. The
install on non-acpi will be no-op and if ACPI support is available in an
arch you didn't think about, it will just work. Seems cleaner to me.

You can have a look at the lttng-modules-dkms package for an example :