[arch-general] Makepkg. Disabling automatically aborting on any errors during packaging
Hello. As you know makepkg since 3.4.0 has feature "automatically aborting on any errors during packaging". Sometimes this feature makes me cry, for example, if build() function has: rm [non-existent file] 2> /dev/null This problem is not critical if you are author of the build()'s code (you can adapt code for the capricious makepkg). But i encountered the following situation: i maintain psi-plus aur package. This project has bash library libpsibuild.sh for making (because it is a complex process). I use this library in the build() function of the PKGBUILD. If i run build() function just under the bash, program builds great, but with makepkg it falls with error. I can do patch for this library, but it is not good solution, because of this library updates literally every day. So i requesting something like boolean variable in the PKGBUILD, which can switch automatically aborting. If author preferred to disable this feature, he will take care of error handling in the code directly. As i know, gentoo portages has somesing like this.
On 27/06/11 13:15, Joker-jar wrote:
Hello. As you know makepkg since 3.4.0 has feature "automatically aborting on any errors during packaging". Sometimes this feature makes me cry, for example, if build() function has:
rm [non-existent file] 2> /dev/null
This problem is not critical if you are author of the build()'s code (you can adapt code for the capricious makepkg). But i encountered the following situation: i maintain psi-plus aur package. This project has bash library libpsibuild.sh for making (because it is a complex process). I use this library in the build() function of the PKGBUILD. If i run build() function just under the bash, program builds great, but with makepkg it falls with error. I can do patch for this library, but it is not good solution, because of this library updates literally every day.
So i requesting something like boolean variable in the PKGBUILD, which can switch automatically aborting. If author preferred to disable this feature, he will take care of error handling in the code directly. As i know, gentoo portages has somesing like this.
Not going to happen. Use: libpsibuild.sh || true and the error in libpsibuild.sh will be ignored. Allan
i use libpsibuild.sh so: . ./libpsibuild.sh function_from_libpsibuild other_function_from_libpsibuild so, i can do: function_from_libpsibuild || true other_function_from_libpsibuild || true and it will be work fine?
On 27/06/11 13:56, Joker-jar wrote:
i use libpsibuild.sh so:
. ./libpsibuild.sh
function_from_libpsibuild other_function_from_libpsibuild
so, i can do:
function_from_libpsibuild || true other_function_from_libpsibuild || true
and it will be work fine?
If you define "fine" as ignoring any error in those functions, then yes...
Not going to happen. Use:
libpsibuild.sh || true
and the error in libpsibuild.sh will be ignored.
set +e # disable the feature <your code> set -e # enable again
participants (3)
-
Allan McRae
-
Florian Pritz
-
Joker-jar