[Rpm-maint] [rpm-software-management/rpm] Define a macro if it is not defined (Discussion #2342)

David Deaderick notifications at github.com
Mon Jan 9 23:10:06 UTC 2023


I need help understanding the syntax of defining a macro if it is not defined, as described at [Macro syntax](https://rpm-software-management.github.io/rpm/manual/macros.html)
```
%{!?with_python3: %global with_python3 1}
```

I am trying to build the following macro:
```
%global _TSCOVersion %{!?major:%global major 22}.%{!?minor:%global minor 4}.%{!?servicepack:%global servicepack 00}
```
I expect it to expand to: ```22.4.00```
but it expands to:  ```..```

Am I misunderstanding the syntax?

I am using RPM 4.14.3 on Red Hat Enterprise Linux 8.7.

Thank you,

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/discussions/2342
You are receiving this because you are subscribed to this thread.

Message ID: <rpm-software-management/rpm/repo-discussions/2342 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20230109/0732248f/attachment.html>


More information about the Rpm-maint mailing list