[Rpm-maint] [rpm-software-management/rpm] RFE: explicitly output build directory path(s) in the build log (Issue #3147)
Panu Matilainen
notifications at github.com
Fri Jun 7 06:20:38 UTC 2024
> Yet another idea: Have an rpmbuild subcommand that runs an interactive shell (or a command if supplied instead) _in_ the same environment. Basically, what you propose but flipped inside out 😄
>
> E.g. `rpmbuild --shell sh -c 'echo $RPM_BUILD_DIR'`
Heh, I had this same exact idea yesterday evening after closing the laptop for the day.
We indeed already have similar things around, rpmspec and rpmlua have --shell, and like you said, our test-suite has it too.
Because the needs of folks running stuff this way vary a lot, I think --shell would need to be a "subcommand" that runs before exiting rpmbuild. Eg,
'rpmbuild -bp --shell ...' would run the shell bit after running %prep, but before exiting, 'rpmbuild -bc --shell' after compile phase, etc. It probably should be disabled during actual package builds.
As for printing out relevant parts, instead of adding individual prints with names in there, I think we should just dump the (rpm specific) environment out into the build log. It'll help diagnosis in several other situations too, right now you need to catch an in-flight scriptlet execution to see what exactly is in the temporary scriptlet that is actually executing. And, if we put the environment into a file, which has the benefit of being sourceable for other purposes, printing it out is just a matter of simple "cat".
This is starting to look like a plan with several benefits and no downsides.
--
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/issues/3147#issuecomment-2154160527
You are receiving this because you are subscribed to this thread.
Message ID: <rpm-software-management/rpm/issues/3147/2154160527 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20240606/1602c806/attachment.html>
More information about the Rpm-maint
mailing list