[pacman-dev] [PATCH] makepkg: add --allsource option

Allan McRae mcrae_allan at hotmail.com
Mon Jun 2 10:56:41 EDT 2008


Dan McGee wrote:
> <snip>
> +	local netfile
> +	for netfile in ${source[@]}; do
> +		local file=$(strip_url "$netfile")
> +		if [ -f $netfile ]; then
> +			msg2 "$(gettext "Adding %s...")" "$netfile"
> +			comp_files="$comp_files $netfile"
> +		elif [ "$SOURCEONLY" = "2" -a -f "$srcdir/$file" ]; then
> +			msg2 "$(gettext "Adding %s...")" "$file"
> +			comp_files="$comp_files -C $srcdir $file"
>   

I'm a little confused here.  The file $srcdir/$file is just a link to 
$SRCDEST/$file which may be $startdir/$file.  So does this not just add 
the symbolic link to the tarball.  Also, the -C option flags all 
following files to be from the $srcdir directory.  So, anything added 
after this will also get its symbolic link added.

If I'm not going down the wrong track here, this should fix it...

+	local netfile
+	for netfile in ${source[@]}; do
+		local file=$(strip_url "$netfile")
+		if [ -f $netfile ]; then
+			msg2 "$(gettext "Adding %s...")" "$netfile"
+			comp_files="$comp_files -C $startdir $netfile"
+		elif [ "$SOURCEONLY" = "2" -a -f "$SRCDEST/$file" ]; then
+			msg2 "$(gettext "Adding %s...")" "$file"
+			comp_files="$comp_files -C $SRCDEST $file"








More information about the pacman-dev mailing list