Re: [Rpm-maint] [rpm-software-management/rpm] RFE: Add shorthand syntax for default macro values (#1756)
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#issuecomment-951879592___ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] [rpm-software-management/rpm] RFE: Add shorthand syntax for default macro values (#1756)
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-951765401___ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] [rpm-software-management/rpm] RFE: Add shorthand syntax for default macro values (#1756)
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 mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint
[Rpm-maint] [rpm-software-management/rpm] RFE: Add shorthand syntax for default macro values (#1756)
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 to help here. -- 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___ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint