[Rpm-maint] [rpm-software-management/rpm] `%error` does not abort specfile processing when called through lua (Issue #2653)
Maxwell G
notifications at github.com
Sun Sep 10 21:48:19 UTC 2023
Take the following macro definitions:
``` spec
%error_1 %{error:Sorry, this is an error}
%error_2 %{lua:
rpm.expand("%{error:Sorry, this is an error}")
}
%error_3 %{lua:
macros.error({"Sorry, this is an error"})
}
```
``` console
$ rpm -E %error_1
error: Sorry, this is an error
$ echo $?
1
$ rpm -E %error_2
error: Sorry, this is an error
error: lua script failed: [string "<lua>"]:2: error expanding macro
$ echo $?
1
$ rpm -E %error_3
error: Sorry, this is an error
$ echo $?
0
```
The first two invocations work as expected and abort specfile processing, while the third example that calls `%error` via the 4.17+ lua `macros` table does not.
--
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/issues/2653
You are receiving this because you are subscribed to this thread.
Message ID: <rpm-software-management/rpm/issues/2653 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20230910/7bfc9458/attachment.html>
More information about the Rpm-maint
mailing list