[pacman-dev] [PATCH] makepkg: allow make-style environment var overrides

Dave Reisner d at falconindy.com
Mon Aug 5 10:23:38 EDT 2013


On Mon, Aug 05, 2013 at 11:30:09AM +0800, lolilolicon wrote:
> Allan McRae <allan at archlinux.org> wrote:
> > On 04/08/13 02:26, Dave Reisner wrote:
> >> +     if [[ $1 = ?(_[[:alpha:]])+([[:alnum:]_])?(+)=* ]]; then
> >
> > This matches "1=2" which then bails on the export.   Should it be:
> >
> > +(_[[:alpha:]])?([[:alnum:]_])?(+)=*
> >
> 
> There must be a typo, I think it should be this:
> 
> [_[:alpha]]*([_[:alnum:]])?(+)
> 
> which also allows setting the special shell variable $_ but maybe it's fine.
> 

Yeah, this is the correct solution. It's fine if people try to set
things they aren't supposed to -- makepkg shouldn't actively be in the
game of trying to discourage it.


More information about the pacman-dev mailing list