Re: %bcond_with/%bcond_without

2021-01-29 Thread Miro Hrončok
This is a side topic, and I didn't want to clutter the FESCo ticket with that. But here we have threads, so I hope that you'll forgive me ;) If find the %bcond_with/%bcond_without pattern abhorrent. 1. The logic is reversed: when I see "with" I think something is enabled, when

Re: %bcond_with/%bcond_without

2020-04-06 Thread Richard Shaw
On Mon, Apr 6, 2020 at 2:03 AM Petr Pisar wrote: > > The dist-bound conditional should be specified outside the spec file, > preferably on a distribution-level. E.g. RHEL decides that it does not > want to distribute a documentation, then it defines "%_without_docs 1" in > srpm > build root macro

Re: %bcond_with/%bcond_without

2020-04-06 Thread Panu Matilainen
On 4/6/20 12:53 PM, Nicolas Mailhot via devel wrote: Le lundi 06 avril 2020 à 09:03 +0200, Petr Pisar a écrit : # Build an HTML manual with ascidoc %bcond_without docs # Perform the tests %bcond_without tests I feel the above syntax is hopeless. You need boilerplate (in all eln specs!) to exp

Re: %bcond_with/%bcond_without

2020-04-06 Thread Petr Pisar
On Mon, Apr 06, 2020 at 11:53:55AM +0200, Nicolas Mailhot via devel wrote: > Le lundi 06 avril 2020 à 09:03 +0200, Petr Pisar a écrit : > > > > # Build an HTML manual with ascidoc > > %bcond_without docs > > # Perform the tests > > %bcond_without tests > > I feel the above syntax is hopeless. You

Re: %bcond_with/%bcond_without

2020-04-06 Thread Zbigniew Jędrzejewski-Szmek
On Mon, Apr 06, 2020 at 09:03:08AM +0200, Petr Pisar wrote: > On Sat, Apr 04, 2020 at 03:14:07PM +, Zbigniew Jędrzejewski-Szmek wrote: > > This is not what we were discussing. This should be compared with > > %bcond_with/%bcond_without, which would looks like this: > > &g

Re: %bcond_with/%bcond_without

2020-04-06 Thread Nicolas Mailhot via devel
Le lundi 06 avril 2020 à 09:03 +0200, Petr Pisar a écrit : > > # Build an HTML manual with ascidoc > %bcond_without docs > # Perform the tests > %bcond_without tests I feel the above syntax is hopeless. You need boilerplate (in all eln specs!) to explain that foo_without tests means enabling test

Re: %bcond_with/%bcond_without

2020-04-06 Thread Petr Pisar
On Sat, Apr 04, 2020 at 03:14:07PM +, Zbigniew Jędrzejewski-Szmek wrote: > This is not what we were discussing. This should be compared with > %bcond_with/%bcond_without, which would looks like this: > > %if 0%{?fedora} > 0 > %bcond_without docs > %bcond_without test

Re: %bcond_with/%bcond_without

2020-04-04 Thread Zbigniew Jędrzejewski-Szmek
g > > > %endif > > > ``` > > > > > > This makes conditionals (when they are necessary) much easier to > > > maintain (and understand), in my experience." > > > > This is a side topic, and I didn't want to clutter the FESCo ticket &g

Re: %bcond_with/%bcond_without

2020-04-04 Thread Richard Shaw
On Sat, Apr 4, 2020 at 4:32 AM Aleksandra Fedorova wrote: > Something like: > > %if 0%{?fedora} > 0 > %define_cond docs 1 > %define_cond tests 1 > %endif > > %if 0%{?rhel} > 0 > %define_cond docs 0 > %define_cond tests 1 > %endif > Isn't the >0 superfluous? Just the "%if 0%{?fedora}" will evalu

Re: %bcond_with/%bcond_without

2020-04-04 Thread Aleksandra Fedorova
; %endif > > > > # ... > > > > %if %{with docs} > > # do something > > %endif > > ``` > > > > This makes conditionals (when they are necessary) much easier to > > maintain (and understand), in my experience." > > This is a s

Re: %bcond_with/%bcond_without

2020-04-03 Thread Sérgio Basto
On Fri, 2020-04-03 at 20:36 +, Zbigniew Jędrzejewski-Szmek wrote: > 1. The logic is reversed: when I see "with" I think something is > enabled, >when I see "without" I think something is disabled. But it's > actually >the other way around here, which I find very confusing and often > ge

Re: %bcond_with/%bcond_without

2020-04-03 Thread Christopher Engelhard
On 03.04.20 22:36, Zbigniew Jędrzejewski-Szmek wrote: > So... could we please get a way to express this in rpm with a sane syntax: > > %define_cond docs 0%{?fedora} > 0 Oh please, yes. Christopher ___ devel mailing list -- devel@lists.fedoraproject.org

Re: %bcond_with/%bcond_without

2020-04-03 Thread Miro Hrončok
On 03. 04. 20 22:36, Zbigniew Jędrzejewski-Szmek wrote: So... could we please get a way to express this in rpm with a sane syntax: %define_cond docs 0%{?fedora} > 0 (Naming and details of syntax are just examples, but the important parts are: one line, name before value, positive logic). Yes

%bcond_with/%bcond_without

2020-04-03 Thread Zbigniew Jędrzejewski-Szmek
h easier to > maintain (and understand), in my experience." This is a side topic, and I didn't want to clutter the FESCo ticket with that. But here we have threads, so I hope that you'll forgive me ;) If find the %bcond_with/%bcond_without pattern abhorrent. 1. The logic is reve