[pacman-dev] [PATCH v2] makepkg: Empty/create only $pkgdir's relevant to current PKGBUILD

Dave Reisner d at falconindy.com
Thu Mar 26 14:08:54 UTC 2015


On Thu, Mar 26, 2015 at 02:59:31PM +0100, David Macek wrote:
> On 26. 3. 2015 14:53, Dave Reisner wrote:
> >> +		for pkg in $pkgname; do
> > 
> > This can't be right -- you wanted "${pkgname[@]}" (with quotes).
> > 
> >> +			rm -rf "$pkgdirbase/$pkg"
> >> +		done
> 
> I wasn't completely sure about it, but I don't think pkgnames can contain whitespace and it is what Allan suggested. Maybe I wasn't supposed to copy it verbatim.

No, pkgname cannot contain quotes, but that's a minor issue. "$pkgname"
will only expand to the equivalent of "${pkgname[0]}", leaving you with
directories still in "$pkgbasedir" after the loop terminates.

> Am I missing `local pkg` there somewhere?

Yes.

> 
> -- 
> David Macek
> 


More information about the pacman-dev mailing list