enhance slightly %forgemeta to help investigating when it is called in silent mode from another macro

This commit is contained in:
Nicolas Mailhot 2018-01-23 12:47:32 +01:00
parent c6cdde1b01
commit c314c8a285

View File

@ -35,10 +35,11 @@
# spec variable if it manages to parse it.
# -s Silently ignore problems in forgeurl, use it if it can be parsed,
# ignore it otherwise.
# -p Restore problem handling, override -s.
# -v Be verbose and print every spec variable the macro sets.
# -i Print some info about the state of spec variables the macro may use or
# set at the end of the processing.
%forgemeta(u:svi) %{lua:
%forgemeta(u:spvi) %{lua:
local forgeurl = rpm.expand("%{?-u*}")
if (forgeurl == "") then
forgeurl = rpm.expand("%{?forgeurl}")
@ -49,6 +50,9 @@ local informative = false
if (rpm.expand("%{?-s}") ~= "") then
silent = true
end
if (rpm.expand("%{?-p}") ~= "") then
silent = false
end
if (rpm.expand("%{?-v}") ~= "") then
verbose = true
end