Subject: Re: PR/36588 CVS commit: pkgsrc/mk
To: None <rillig@NetBSD.org, gnats-admin@netbsd.org,>
From: Christoph Badura <bad@bsd.de>
List: pkgsrc-bugs
Date: 08/11/2007 18:40:03
The following reply was made to PR pkg/36588; it has been noted by GNATS.

From: Christoph Badura <bad@bsd.de>
To: gnats-bugs@NetBSD.org
Cc: rillig@NetBSD.org, gnats-admin@netbsd.org, pkgsrc-bugs@netbsd.org
Subject: Re: PR/36588 CVS commit: pkgsrc/mk
Date: Sat, 11 Aug 2007 20:36:59 +0200

 On Sat, Aug 11, 2007 at 04:30:02PM +0000, Roland Illig wrote:
 >  Log Message:
 >  pkg_info -Q does not print a newline if a variable isn't defined at all
 >  in the installed package's +BUILD_INFO. Therefore, an empty line is
 >  printed in advance to avoid a warning by make(1). Fixes PR 36588.
 >  
 >  cvs rdiff -r1.3 -r1.4 pkgsrc/mk/pkg-build-options.mk
 
 The change in that revision does not match the commit message.
 
 First, the second hunk is not described at all in the commit message.
 Second, in the second hunk no empty line is printed in advance of the
 pkg_info -Q.  Why would the second one magically print a newline?
 
 --chris
 
 ***************
 *** 23,28 ****
 --- 25,31 ----
   .  for b in ${pkgbase}
   .    if !defined(PKG_BUILD_OPTIONS.${b})
   PKG_BUILD_OPTIONS.${b} != \
 +       echo ""; \
         ${PKG_INFO} -Q PKG_OPTIONS ${pkgbase} 2>/dev/null \
         || { cd ${BUILDLINK_PKGSRCDIR.${b}} \
              && ${MAKE} ${MAKEFLAGS} show-var VARNAME=PKG_OPTIONS; }
 ***************
 *** 32,37 ****
 --- 35,59 ----
   
   MAKEVARS+=    PKG_BUILD_OPTIONS.${b}
   .  endfor
 + 
 + .elif defined(bl4_package) && defined(pkgpath)
 + .  for b in ${bl4_package}
 + .    if !defined(PKG_BUILD_OPTIONS.${b})
 + .      if ${pkgpath} == ${PKGPATH}
 + PKG_BUILD_OPTIONS.${b} = ${PKG_OPTIONS}
 + .      else
 + PKG_BUILD_OPTIONS.${b} != \
 +       ${PKG_INFO} -Q PKG_OPTIONS ${b} 2>/dev/null \
 +       || { cd ${PKGSRCDIR}/${pkgpath} \
 +            && ${MAKE} ${MAKEFLAGS} show-var VARNAME=PKG_OPTIONS; }
 + 
 + MAKEFLAGS+=   PKG_BUILD_OPTIONS.${b}=${PKG_BUILD_OPTIONS.${b}:Q}
 + .      endif
 + .    endif
 + 
 + MAKEVARS+=    PKG_BUILD_OPTIONS.${b}
 + .  endfor
 + 
   .else
   .  for b in ${pkgbase}
   PKG_FAIL_REASON+=     "[pkg-build-options.mk] This file may only be included from a buildlink3.mk file (pkgbase=${b})."