rpmbuild --eval of lua macros

Josh Boyer jwboyer at fedoraproject.org
Thu Jul 9 18:47:23 UTC 2015


I'm trying to get rpmbuild to print the expansion of the %{patches}
macro in our kernel package.  When I run rpmbuild --eval %{patches}
kernel.spec, I get the following error:

error: lua script failed: [string "<lua>"]:1: bad argument #1 to
'ipairs' (table expected, got nil)

Looking at the macro, it seems it is dynamically constructed as rpm
parses the spec file.  What I cannot figure out is how to force rpm to
actually do that when passing --eval.  It seems the --eval option
doesn't call the code that would build the patches table?  That is my
best guess anyway.

So is there a way to get rpm to expand this macro and print out the value?


More information about the Rpm-list mailing list