From c314c8a28540c222d2629f4d1b54573c2c41715c Mon Sep 17 00:00:00 2001 From: Nicolas Mailhot Date: Tue, 23 Jan 2018 12:47:32 +0100 Subject: [PATCH] enhance slightly %forgemeta to help investigating when it is called in silent mode from another macro --- macros.forge | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/macros.forge b/macros.forge index 426dc03..edfeb6e 100644 --- a/macros.forge +++ b/macros.forge @@ -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