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

pavlinamv notifications at github.com
Thu Aug 15 11:24:27 UTC 2019


> Another thing is that this syntax makes it impossible to have colons (':') in the output (eg '%{!?foo::}'), which is a limitation the original syntax doesn't have'. It obviously has it's own set of limitations and quirks...

Not impossible, but not straightforward. For ':' in the output you can use %define / %global:
rpm --define "text1 :" --eval '%{!?{foo}:%{text1}:%{text2}}'
or you can use %expand:
rpm --eval '%{!?{foo}:%{expand::}:%{expand::}}

-- 
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-521608946
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20190815/62b743b4/attachment.html>


More information about the Rpm-maint mailing list