Subject: Re: review wanted: bsd.bulk-pkg.mk bulk-check-uptodate fixes
To: None <tech-pkg@netbsd.org>
From: Hubert Feyrer <hubert.feyrer@informatik.fh-regensburg.de>
List: tech-pkg
Date: 10/06/2003 00:58:15
On Mon, 6 Oct 2003, Hubert Feyrer wrote:
> 2) It's not good enough to have a required binary pkg available to not
>    rebuild things. If one is available but it's newer, we still need
>    to rebuild.
>
>    That's addressed in the second chunk of the patch below.

Actually, that was properly addressed before - updated patch below.


 - Hubert

Index: bsd.bulk-pkg.mk
===================================================================
RCS file: /cvsroot/pkgsrc/mk/bulk/bsd.bulk-pkg.mk,v
retrieving revision 1.49
diff -u -r1.49 bsd.bulk-pkg.mk
--- bsd.bulk-pkg.mk	2 Sep 2003 07:00:04 -0000	1.49
+++ bsd.bulk-pkg.mk	5 Oct 2003 22:57:17 -0000
@@ -160,9 +160,7 @@
 	fi ; \
 	if [ "$$uptodate" = "1" ]; then \
 		${SHCOMMENT} "Check required binary packages" ; \
-		deps=`${PKG_INFO} -qf ${REF} \
-		      | ${GREP} '^@pkgdep' \
-		      | ${SED} 's,@pkgdep.,,g'`; \
+		deps=${DEPENDS:C/:.*//:Q} ; \
 		for dep in $$deps ; do \
 			${SHCOMMENT} "check against the binary pkg that pkg_add would pick, too:" ; \
 			${SHCOMMENT} "(Only one should be returned here, really...)" ; \
@@ -170,7 +168,7 @@
 			if [ -z "$$pkg" ]; then \
 				${ECHO_MSG} >&2 "BULK> Required binary package $$dep does not exist, rebuilding... " ; \
 				uptodate=0 ; \
-			elif [ -n "$$(find \"$$pkg\" -prune -newer \"${REF}\")" ]; then \
+			elif [ -n "$$(${FIND} $$pkg -prune -newer ${REF})" ]; then \
 				${ECHO_MSG} >&2 "BULK> Required binary package $$dep (`basename $$pkg`) is newer, rebuilding... " ; \
 				uptodate=0 ; \
 			else \

-- 
  ___ _ _  _   _        * Harddisk Image Cloning *
 / __| | || | | |           www.feyrer.de/g4u/
| (_ |_  _| |_| |
 \___| |_| \___/          v1.12 out now, including partition support!