Dne 22. 10. 18 v 19:12 Neal Gompa napsal(a):
On Fri, May 12, 2017 at 5:02 AM Vít Ondruch
<vondruch(a)redhat.com> wrote:
>
>
> Dne 11.5.2017 v 23:03 Tomasz Kłoczko napsal(a):
>> On 9 May 2017 at 09:29, Jun Aruga <jaruga(a)redhat.com> wrote:
>>> %{!?_with_bootstrap: %global bootstrap 1}
>>> ```
>>>
>>> At least below proposal is better than current situation.
>>>
>>> ```
>>> %{?_with_bootstrap: %global bootstrap 1}
>>> ```
>> Guys really try to learn how to use %bcond. It does not hurt.
>> You can invent infinite combinations of implementing equivalents o
>> %bconds and it it will be still only nothing more than other NIH
>> consequence.
> Please understand that there is no way how to use %bcond in Koji (to my
> knowledge), while there are ways to set the %boostrap macro.
>
There are no ways to set arbitrary macros in Koji at this time. There
is some work to set per-tag macros:
https://pagure.io/koji/pull-request/898
But the per-tag macros are not per-build, as you seem to want.
Nice, didn't know about this possibility.
Nevertheless, with modularity, there are also other ways to set macros
in buildroot AFAIK.
Vít
>
> That said, if you want to set a macro to trigger a bcond, you can just
> do the following:
>
> macros.bootstrap:
> %_with_bootstrap 1
>
> The above triggers the "%bcond_with bootstrap" evaluation to true,
> which enables the bootstrap build. I do this all the time for internal
> builds with other bconds with my OBS instance for the third-party
> packages I maintain.
>
> This logic is present in /usr/lib/rpm/macros if you'd like to verify
> it yourself.
>
>
> --
> 真実はいつも一つ!/ Always, there's only one truth!
> _______________________________________________
> packaging mailing list -- packaging(a)lists.fedoraproject.org
> To unsubscribe send an email to packaging-leave(a)lists.fedoraproject.org
> Fedora Code of Conduct:
https://getfedora.org/code-of-conduct.html
> List Guidelines:
https://fedoraproject.org/wiki/Mailing_list_guidelines
> List Archives:
https://lists.fedoraproject.org/archives/list/packaging@lists.fedoraproje...