Subject: Re: pkg/29216
To: None <pkg-manager@netbsd.org, gnats-admin@netbsd.org,>
From: Alistair Crooks <agc@pkgsrc.org>
List: pkgsrc-bugs
Date: 02/11/2005 17:36:01
The following reply was made to PR pkg/29216; it has been noted by GNATS.

From: Alistair Crooks <agc@pkgsrc.org>
To: gnats-bugs@NetBSD.org
Cc: pkg-manager@NetBSD.org, gnats-admin@NetBSD.org,
	pkgsrc-bugs@NetBSD.org
Subject: Re: pkg/29216
Date: Fri, 11 Feb 2005 17:35:23 +0000

 On Fri, Feb 11, 2005 at 05:17:02AM +0000, HIRAMATSU Yoshifumi wrote:
 > The following reply was made to PR pkg/29216; it has been noted by GNATS.
 > 
 > From: HIRAMATSU Yoshifumi <hiramatu@boreas.dti.ne.jp>
 > To: gnats-bugs@NetBSD.org
 > Cc: 
 > Subject: Re: pkg/29216
 > Date: Fri, 11 Feb 2005 14:15:58 +0900
 > 
 >  This patch replaces hard coded "grep" to ${GREP}. Does this fix this problem?
 >  
 >  --- bsd.pkg.mk.orig     Fri Feb 11 14:05:44 2005
 >  +++ bsd.pkg.mk  Fri Feb 11 14:08:31 2005
 >  @@ -1163,7 +1163,7 @@
 >   .  for def in ${EVAL_PREFIX}
 >   .    if !defined(${def:C/=.*$//})
 >   ${def:C/=.*$//}_DEFAULT?=${LOCALBASE}
 >  -_${def:C/=.*$//}_CMD=  ${PKG_INFO} -qp ${def:C/^.*=//} 2>/dev/null | ${AWK} '{ print $$2; exit }' | grep '' || ${ECHO} ${${def:C/=.*$//}_DEFAULT}
 >  +_${def:C/=.*$//}_CMD=  ${PKG_INFO} -qp ${def:C/^.*=//} 2>/dev/null | ${AWK} '{ print $$2; exit }' | ${GREP} '' || ${ECHO} ${${def:C/=.*$//}_DEFAULT}
 >   ${def:C/=.*$//}=       ${_${def:C/=.*$//}_CMD:sh}
 >   MAKEFLAGS+=            ${def:C/=.*//}=${_${def:C/=.*$//}_CMD:sh}
 >   .    endif
 >  
 
 Just a quick question - why use grep at all here - surely we can
 do the test just as easily in the AWK stage just prior to that?
 
 Regards,
 Alistair