[Rpm-maint] [rpm-software-management/rpm] Don't print empty return of --eval macro expansion (PR #3804)

Paul Bolle notifications at github.com
Wed Jun 11 15:17:03 UTC 2025


The macro expansion of an --eval need not return anything (eg, it could be a lua script only run for its side effects). That --eval then prints an empty line. A silly example:

`$ rpm --eval '%{lua: a = 1}' --eval '%{lua: print( "Hi!" )}' --eval '%{lua: b = 2}' 

Hi!

`
This trivial commit skips printing if the macro expansion is an empty string. Tested lightly on rpm-4.20.1 (Fedora 42) and forward-ported to master.
You can view, comment on, or merge this pull request online at:

  https://github.com/rpm-software-management/rpm/pull/3804

-- Commit Summary --

  * Don't print empty return of --eval macro expansion

-- File Changes --

    M lib/poptALL.cc (4)

-- Patch Links --

https://github.com/rpm-software-management/rpm/pull/3804.patch
https://github.com/rpm-software-management/rpm/pull/3804.diff

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

Message ID: <rpm-software-management/rpm/pull/3804 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20250611/8b3491f2/attachment.htm>


More information about the Rpm-maint mailing list