Subject: Recursive dependencies, again (PR pkg/21097)
To: None <tech-pkg@netbsd.org>
From: Todd Vierling <tv@duh.org>
List: tech-pkg
Date: 04/01/2004 09:16:01
April 1 is an appropriate day to bring this up again, though I'm actually
quite serious.  :)

I've heard zero technical objections to turning off recursive registration
in bsd.pkg.mk, which is one of the prerequisites to solving 21097.  From my
rigorous usage since before submitting that PR in April of last year, I've
never had a broken dependency, likely due to the use of buildlink[23] to
track these things.  I have, however, been blessed with a less interwoven
dependency tree that has made it a bit easier to use binary pkgs.

I'd like to ask one last time before committing if there are any objections
to the following change.

Index: bsd.pkg.mk
===================================================================
RCS file: /cvsroot/pkgsrc/mk/bsd.pkg.mk,v
retrieving revision 1.1434
diff -u -r1.1434 bsd.pkg.mk
--- bsd.pkg.mk	31 Mar 2004 11:19:09 -0000	1.1434
+++ bsd.pkg.mk	1 Apr 2004 14:08:10 -0000
@@ -822,7 +822,7 @@
 PKG_ARGS_COMMON=	-v -c -${COMMENT:Q}" " -d ${DESCR} -f ${PLIST}
 PKG_ARGS_COMMON+=	-l -b ${BUILD_VERSION_FILE} -B ${BUILD_INFO_FILE}
 PKG_ARGS_COMMON+=	-s ${SIZE_PKG_FILE} -S ${SIZE_ALL_FILE}
-PKG_ARGS_COMMON+=	-P "`${MAKE} ${MAKEFLAGS} run-depends-list PACKAGE_DEPENDS_QUICK=true | ${SORT} -u`"
+PKG_ARGS_COMMON+=	-P "`${MAKE} ${MAKEFLAGS} run-depends-list | ${SORT} -u`"
 .  if defined(CONFLICTS) && (${PKG_INSTALLATION_TYPE} == "overwrite")
 PKG_ARGS_COMMON+=	-C "${CONFLICTS}"
 .  endif
@@ -4088,10 +4088,6 @@
 # Show (recursively) all the packages this package depends on.
 # If PACKAGE_DEPENDS_WITH_PATTERNS is set, print as pattern (if possible)
 PACKAGE_DEPENDS_WITH_PATTERNS?=true
-# To be used (-> true) ONLY if the pkg in question is known to be installed
-# (i.e. when calling for pkg_create args, and for fake-pkg)
-# Will probably not work with PACKAGE_DEPENDS_WITH_PATTERNS=false ...
-PACKAGE_DEPENDS_QUICK?=false
 .PHONY: run-depends-list
 .if !target(run-depends-list)
 run-depends-list:
@@ -4108,16 +4104,6 @@
 			${ECHO_MSG} "Warning: \"$$dir\" non-existent -- @pkgdep registration incomplete" >&2; \
 		fi;							\
 	fi;								\
-	if ${PACKAGE_DEPENDS_QUICK}; then 				\
-		found=`${PKG_BEST_EXISTS} "$$pkg"`;			\
-		${PKG_INFO} -qf "$$found" | ${AWK} '/^@pkgdep/ {print $$2}'; \
-	else 								\
-		if cd $$dir 2>/dev/null; then				\
-			${MAKE} ${MAKEFLAGS} run-depends-list PACKAGE_NAME_TYPE=${PACKAGE_NAME_TYPE} PACKAGE_DEPENDS_WITH_PATTERNS=${PACKAGE_DEPENDS_WITH_PATTERNS}; \
-		else 							\
-			${ECHO_MSG} "Warning: \"$$dir\" non-existent -- @pkgdep registration incomplete" >&2; \
-		fi;							\
-	fi
 .  endfor
 .endif # target(run-depends-list)

@@ -4522,7 +4508,7 @@
 # dependencies are all installed.
 .PHONY: print-pkg-size-depends
 print-pkg-size-depends:
-	@${MAKE} ${MAKEFLAGS} run-depends-list PACKAGE_DEPENDS_QUICK=true \
+	@${MAKE} ${MAKEFLAGS} run-depends-list				\
 	| ${XARGS} -n 1 ${SETENV} ${PKG_BEST_EXISTS}			\
 	| ${SORT} -u							\
 	| ${XARGS} -n 256 ${SETENV} ${PKG_INFO} -qs			\
@@ -4828,7 +4814,7 @@
 				${CP} ${MESSAGE} ${_PKG_DBDIR}/${PKGNAME}/+DISPLAY; \
 			fi;						\
 		fi;							\
-		list="`${MAKE} ${MAKEFLAGS} run-depends-list PACKAGE_DEPENDS_QUICK=true ECHO_MSG=${TRUE} | ${SORT} -u`" ; \
+		list="`${MAKE} ${MAKEFLAGS} run-depends-list ECHO_MSG=${TRUE} | ${SORT} -u`" ; \
 		for realdep in `${ECHO} $$list | ${XARGS} -n 1 ${SETENV} ${PKG_BEST_EXISTS} | ${SORT} -u`; do \
 			if ${TEST} -z "$$realdep"; then			\
 				${ECHO} "$$dep not installed - dependency NOT registered" ; \

-- 
-- Todd Vierling <tv@duh.org> <tv@pobox.com>