pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: pkg/29216



The following reply was made to PR pkg/29216; it has been noted by GNATS.

From: HIRAMATSU Yoshifumi <hiramatu%boreas.dti.ne.jp@localhost>
To: Alistair Crooks <agc%pkgsrc.org@localhost>
Cc: gnats-bugs%NetBSD.org@localhost, pkg-manager%NetBSD.org@localhost,
        gnats-admin%NetBSD.org@localhost, pkgsrc-bugs%NetBSD.org@localhost
Subject: Re: pkg/29216
Date: Wed, 16 Feb 2005 02:26:14 +0900

 At Fri, 11 Feb 2005 17:35:23 +0000,
 Alistair Crooks <agc%pkgsrc.org@localhost> wrote:
 > > From: HIRAMATSU Yoshifumi <hiramatu%boreas.dti.ne.jp@localhost>
 > > To: gnats-bugs%NetBSD.org@localhost
 > > 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?
 
 It seems that the behaviour of "grep ''" is the same as "cat"; copy all input
 to stdout. Can we simply remove the grep part?
 
 -_${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 }' || ${ECHO} ${${def:C/=.*$//}_DEFAULT}
 
 After I applied above change, I tried "make package" in databases/php-mysql,
 which defines EVAL_PREFIX in its Makefile, and successfully finished.
 
 -- 
 // HIRAMATSU Yoshifumi
 // hiramatu%boreas.dti.ne.jp@localhost
 



Home | Main Index | Thread Index | Old Index