[Rpm-maint] [rpm-software-management/rpm] Triple operator for conditional shortcut (#115)

pavlinamv notifications at github.com
Wed Sep 4 08:49:17 UTC 2019


I do not see any problem in the syntax that @pmatilai proposed in his previous comment:
```%{(<expr>)?<true>:<false>}```
There are two similar options that are closer to the currently proposed triple condition operator syntax (#746):
```%{{<expr>}?<true>:<false>}```
```%{{<expr>}:<true>:<false>}```

Using these syntax the example from the previous @mlschroe comment looks:
```%{(0%?_include_minidebuginfo)?"mini:true":"mini:false"}```
```%{{0%?_include_minidebuginfo}?"mini:true":"mini:false"}```
```%{{0%?_include_minidebuginfo}:"mini:true":"mini:false"}```

Syntax:
```%{expr: 0%?_include_minidebuginfo ? "mini:true" : "mini:false" }```
can cause a small problem in deciding which ? divides the parts of the macro. But it can be solved - the first ? can  be in {}:
```%{expr:0%{?_include_minidebuginfo}? "mini:true" : "mini:false"}```


-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/issues/115#issuecomment-527806699
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20190904/3cefc02f/attachment.html>


More information about the Rpm-maint mailing list