Re: [Rpm-maint] [rpm-software-management/rpm] RFE: Add shorthand syntax for default macro values (#1756)

2021-10-26 Thread Michael Schroeder
Ohh, non-emptyness instead of plain definedness? Like in most shells: `${foo-bar}` versus `${foo:-bar}`... -- 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/1756#issuecomme

Re: [Rpm-maint] [rpm-software-management/rpm] RFE: Add shorthand syntax for default macro values (#1756)

2021-10-26 Thread Panu Matilainen
More thinking out loud, `%{foo|bar}` as a shorthand for the actual expression (`%["%{?foo}" || "bar") -- 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/1756#issuecomment-9

Re: [Rpm-maint] [rpm-software-management/rpm] RFE: Add shorthand syntax for default macro values (#1756)

2021-10-25 Thread Michael Schroeder
Just thinking out loud: ``` %{!foo:bar} %{?foo-bar} ``` -- 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/1756#issuecomment-950854913

[Rpm-maint] [rpm-software-management/rpm] RFE: Add shorthand syntax for default macro values (#1756)

2021-08-17 Thread Panu Matilainen
A common use-case with macros is wanting to fallback to a default value if the macro in question doesn't exist, eg "use value of %foo if defined, or 5 otherwise". This seems unnecessarily clumsy in the current macro implementation: `%{?foo}%{!?foo:5}` and the new expression stuff doesn't seem t