[pacman-dev] [PATCH 3/6] makepkg: prevent issues with files starting with a hyphen

Dave Reisner d at falconindy.com
Mon Mar 12 11:55:51 EDT 2012


On Mon, Mar 12, 2012 at 04:40:38PM +0100, Thomas Bächler wrote:
> Am 09.03.2012 15:01, schrieb Dave Reisner:
> >> @@ -974,7 +974,7 @@ tidy_install() {
> >>  
> >>  	if [[ $(check_option docs) = "n" && -n ${DOC_DIRS[*]} ]]; then
> >>  		msg2 "$(gettext "Removing doc files...")"
> >> -		rm -rf ${DOC_DIRS[@]}
> >> +		rm -rf -- ${DOC_DIRS[@]}
> > 
> > i hate that we can't quote this.
> 
> We can't? Why?
> 

Check out /etc/makepkg.conf. We put globs in DOC_DIRS, and we want them
to expand when they're passed to find. It's "luck" that they don't
expand. You could definitely break this if you created the right file
hierarchy in the build directory, forcing the glob to expand at the time
when /etc/makepkg.conf is sourced.

d


More information about the pacman-dev mailing list