Re: Possible to combine ExclusiveArch?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Jul 14, 2023 at 2:30 PM Richard W.M. Jones <rjones@xxxxxxxxxx> wrote:
>
> For some virt packages we need to combine 2 or 3 of:
>
>   ExclusiveArch: %{kernel_arches}
>   ExclusiveArch: %{qemu_sysemu_host_arches}       # [1]
>   ExclusiveArch: %{ocaml_native_compiler}
>
> to mean only compile on the intersection of these arches.  If you have
> multiple ExclusiveArch lines then RPM seems to do the union of arches
> which is the opposite of what anyone would want.
>
> Dan Berrange came up with a clever way to do it though ...
>
>   %ifnarch %{kernel_arches}
>   ExcludeArch: %{_arch}
>   %endif
>   %ifnarch %{qemu_sysemu_host_arches}
>   ExcludeArch: %{_arch}
>   %endif
>
> But this makes my head hurt.  Is there a better way or could RPM
> provide explicit union and intersection operators?

Well, if you want set union / intersection as an RPM macro, the first
thing I'd try would be to implement this as a lua macro ...
Lua does not have a native "set" data type, but it can be simulated by
using a table's (hashmap's) keys as a "set".

Fabio
_______________________________________________
devel mailing list -- devel@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/devel@xxxxxxxxxxxxxxxxxxxxxxx
Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Users]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]

  Powered by Linux