[pacman-dev] [PATCH] fix in_array (usage) and code cleanup

Aaron Griffin aaronmgriffin at gmail.com
Thu Dec 21 15:49:40 EST 2006


On 12/21/06, Jürgen Hötzel <juergen at hoetzel.info> wrote:
> Hi,
>
> the use of in_array in line 444 is invalid:
>
> bash-3.2$ makepkg-cvs
> /home/juergen/archlinux/pacman-lib/scripts/makepkg: line 444: [: too many
> arguments

Yeah, I think I noticed that when I was doing some of Dan's changes...
and just forgot to fix it.

> Helper function like in_array should not use global variables. I also
> did some code cleanup (the temp. file "filelist" was not even used). Less
> Code. Better Code.

Awesome! Thanks.  For the record, I'm going to change it to something like:
---
pkg_file="$PKGDEST/$pkgname-$pkgver-$pkgrel-${CARCH}.${PKGEXT}"
comp_files=".PKGINFO .FILELIST ${install:+.INSTALL}"

if ! tar czf $pkg_file $comp_files *; then
	error "Failed to create package file."
	exit 1
fi
---
Just to shorten that line (it was > 80, which I dislike, heh)


More information about the pacman-dev mailing list