[Rpm-maint] [rpm-software-management/rpm] add support for %{shrink:}, derived from rpm5.org (#234)

Jeff Johnson notifications at github.com
Sun Jun 18 10:53:03 UTC 2017

@ignatenkobrain : you are correct that stink (or trim/rtrim or strip) isn't very useful for the common task of inserting strings into shell script lets: the shell is very forgiving of white space.

However, when using embedded %{lua:...} templates, or when using --queryformat, where macros are also expanded, extra whitespace or newlines can be a killer.

That is why %{shrink:...} was implemented.

Note that if you are gonna mess with macros, then you might also consider stealing the macro-stack-to-tuple-list syntax.

An example perhaps shows what can be done best:
$ ./rpm -D'args foo' -D'args bar' -D'args baz' -E"%{@args:, }"
foo, bar, baz

You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20170618/7f715e52/attachment.html>

More information about the Rpm-maint mailing list