FS#70415 - setting "set -u" in PKGBUILD causes error messages to fail in errortrap
Attached to Project:
Pacman
Opened by James (thx1138) - Sunday, 11 April 2021, 17:43 GMT
Last edited by Allan McRae (Allan) - Sunday, 11 April 2021, 22:10 GMT
Opened by James (thx1138) - Sunday, 11 April 2021, 17:43 GMT
Last edited by Allan McRae (Allan) - Sunday, 11 April 2021, 22:10 GMT
|
Details
This is an existing issue in pacman 5.2.2, not a regression
in "testing" for pacman 5.2.2-3.
In this case, here is evdi-git building a library after a kernel upgrade but before a reboot, and trying to use the now nonexistant /lib/modules/ directory. This can be resolved with a reboot, to build with the correct new /lib/modules/ directory. That's on evdi-git and its PKGBUILD. But that is not the issue. Instead, the makepkg error which is reported seems pretty useless - or worse - misdirecting. There is: ... make[2]: *** /lib/modules/5.11.6-arch1-1/build: No such file or directory. Stop. ... make: *** [Makefile:8: all] Error 2 ==> ERROR: A failure occurred in build(). /usr/share/makepkg/util/message.sh: line 51: QUIET: unbound variable /usr/bin/makepkg: line 132: logpipe: unbound variable error making: evdi-git This error message looks like an error in the makepkg script /usr/share/makepkg/util/message.sh. Why is that, when this was a make error? The bash scripting, with all its nested and indirect references, seems "a little too clever for itself". Maybe this script can be improved, so that it actually reports the make error, instead of *becoming* the error, and reporting itself. |
This task depends upon
Minimal replicator attached.