ports/115010: Improve the actual-package-depends target for bsd.port.mk

Alexander Leidinger netchild at FreeBSD.org
Sun Jul 29 15:10:02 UTC 2007


>Number:         115010
>Category:       ports
>Synopsis:       Improve the actual-package-depends target for bsd.port.mk
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Jul 29 15:10:01 GMT 2007
>Closed-Date:
>Last-Modified:
>Originator:     Alexander Leidinger
>Release:        FreeBSD 7.0-CURRENT i386
>Organization:
FreeBSD 
>Environment:


System: FreeBSD 7.0-CURRENT #250: Sun Jun  3 12:50:44 CEST 2007
    root at Magellan.Leidinger.net:/usr/src/sys/i386/compile/WORK



>Description:


As nobody complained on the lists, here are the fixes to some issues
with the actual-package-depends target:
 - fix docs to use the right name of the target
 - change the sorting for the packages when used or pgk_create to
   uniquely sort the origin, not the package name (prevents including
   more than one version of the same package in case such a suboptimal
   installation exists)
 - on package list determination check if the origin exists in PORTSDIR,
   skip the current entry if it doesn't exist (if a origin is missing in a old or
   3rd party package, the dependency list is screwed; if a 3rd party
   package doesn't exists while having a origin, this doesn't include it into
   the dependency list, if you have own ports which depend upon
   something like this, you have to create a dummy port/directory for the
   3rd party package)


>How-To-Repeat:





>Fix:


--- bsd.port.mk.diff begins here ---
Index: bsd.port.mk
===================================================================
RCS file: /import/FreeBSD-CVS/ports/Mk/bsd.port.mk,v
retrieving revision 1.573
diff -u -r1.573 bsd.port.mk
--- bsd.port.mk	29 Jun 2007 14:09:39 -0000	1.573
+++ bsd.port.mk	21 Jul 2007 18:03:10 -0000
@@ -732,7 +732,7 @@
 #				  tree as recorded in the Makefiles of the ports
 #				  collection, not as recorded in the currently
 #				  installed ports.
-# actual-package-depends-list
+# actual-package-depends
 #				- Like package-depends-list but with the difference
 #				  that the dependencies of the currently installed
 #				  ports are used instead of the dependencies as
@@ -2458,7 +2469,7 @@
 DISABLE_CONFLICTS=	YES
 .endif
 .if !defined(PKG_ARGS)
-PKG_ARGS=		-v -c -${COMMENT:Q} -d ${DESCR} -f ${TMPPLIST} -p ${PREFIX} -P "`cd ${.CURDIR} && ${MAKE} actual-package-depends | ${GREP} -v -E ${PKG_IGNORE_DEPENDS} | ${SORT} -u`" ${EXTRA_PKG_ARGS} $${_LATE_PKG_ARGS}
+PKG_ARGS=		-v -c -${COMMENT:Q} -d ${DESCR} -f ${TMPPLIST} -p ${PREFIX} -P "`cd ${.CURDIR} && ${MAKE} actual-package-depends | ${GREP} -v -E ${PKG_IGNORE_DEPENDS} | ${SORT} -u -t : -k 2`" ${EXTRA_PKG_ARGS} $${_LATE_PKG_ARGS}
 .if !defined(NO_MTREE)
 PKG_ARGS+=		-m ${MTREE_FILE}
 .endif
@@ -5489,6 +5558,10 @@
 			dir=$${tmp\#\#*/}/$${dir\#\#*/}; \
 			set -- $$origins; \
 			while [ $$\# -gt 1 ]; do \
+				if [ ! -d "${PORTSDIR}/$$2" ]; then \
+					shift; \
+					continue; \
+				fi \
 				if [ "$$dir" = "$$2" ]; then \
 					${ECHO_CMD} $$1:$$dir; \
 					if [ -e ${PKG_DBDIR}/$$1/+CONTENTS -a -z "${EXPLICIT_PACKAGE_DEPENDS}" ]; then \
--- bsd.port.mk.diff ends here ---



>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list