[pacman-dev] bash-3 only error trap activation

Allan McRae allan at archlinux.org
Mon Jun 21 01:36:05 EDT 2010


When running makepkg in bash-3.2 I am getting a couple of error trap 
activations that we do not get in bash-4.1.

Here is the problem area:

check_deps() {
	(( $# > 0 )) || return            <- HERE

	local ret=0
	pmout=$(run_pacman -T "$@")       <- HERE

The first one gets set off anytime "depends" or "makedepends" are empty 
and can be fixed by using "|| return 0", but the second is doing my head 
in...  Of course, turning off the error trap around those commands makes 
it work, and that may be an OK approach given we are dealing with all 
error states below that.

If you want a bash-3.2 package to test grab one from 
http://allanmcrae.com/packages/bash3-3.2.051-1.src.tar.gz .  Test on a 
PKGBUILD with unsatisfied dependencies.


More information about the pacman-dev mailing list