Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines
Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.
REPEAT: Do NOT report bugs for outdated packages!
https://wiki.archlinux.org/title/Bug_reporting_guidelines
Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.
REPEAT: Do NOT report bugs for outdated packages!
FS#79145 - Add option to makepkg to open a sub-shell on failure
Attached to Project:
Arch Linux
Opened by William Totten (biell) - Wednesday, 19 July 2023, 13:42 GMT
Last edited by Toolybird (Toolybird) - Wednesday, 19 July 2023, 22:39 GMT
Opened by William Totten (biell) - Wednesday, 19 July 2023, 13:42 GMT
Last edited by Toolybird (Toolybird) - Wednesday, 19 July 2023, 22:39 GMT
|
DetailsDescription:
It would be nice if `makepkg` had a `--debug-on-failure` option which popped the builder into a shell. When I have built frameworks for building and deploying complex amalgamations of software in the past, I have provided a similar option which trapped EXIT and dropped the user into a shell. This is especially helpful with the complexity of things like `fakeroot`. I recently had to use this method, and after an hour of bewilderment, I finally had the environment to clearly see what was going wrong in a matter of minutes. Essentially, all I did was add the following line to the PKGBUILD: trap "bash --norc -i" EXIT You could get fancy and specify a new PS1 or something like that, but the concept is, upon error, instead of exiting, open a sub-shell allowing a person to re-run the failing command in (almost) the same environment. Adding this would require some conversation. For example, should you then export "pkgdir" and "srcdir"? If so, inside the trap or outside? After debugging, you just exit from the sub-shell and `makepkg` would then just exit like it would have if `makepkg --debug-on-failure` hadn't been the invocation. Anyway Package info: * pacman-6.0.2-7 Steps to reproduce: Take any package failing to build, or insert a build issue, then add the `trap "bash --norc -i" EXIT` to your PKGBUILD yourself to see that it is a helpful option to try and figure out what is going wrong. |
This task depends upon
Closed by Toolybird (Toolybird)
Wednesday, 19 July 2023, 22:39 GMT
Reason for closing: Upstream
Additional comments about closing: See comments
Wednesday, 19 July 2023, 22:39 GMT
Reason for closing: Upstream
Additional comments about closing: See comments
[1] https://gitlab.archlinux.org/pacman/pacman