[Rpm-maint] [rpm-software-management/rpm] --undefine and Lua rpm.undefine() can undefine built-ins (Issue #4133)
Panu Matilainen
notifications at github.com
Thu Mar 5 10:10:56 UTC 2026
pmatilai created an issue (rpm-software-management/rpm#4133)
> rpm --undefine define --eval "%define foo bar" --eval "%foo"
%define foo bar
%foo
> rpm --eval "%{lua: rpm.undefine('getenv'); print(rpm.expand('%{getenv:HOME}'))}"
%{getenv:HOME}
Oops.
I do have a vague recollection about thinking rpm.undefine() shouldn't be using rpmPopMacro() like that, but having built-ins as actual macros kinda escalates this matter a bit 😅 and technically this is a regression from that change.
--
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/issues/4133
You are receiving this because you are subscribed to this thread.
Message ID: <rpm-software-management/rpm/issues/4133 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20260305/7c8b4a8f/attachment-0001.htm>
More information about the Rpm-maint
mailing list