ports/116601: [patch] bsd.port.mk - fail if dependency failed

Edwin Groothuis edwin at mavetju.org
Mon Sep 24 10:20:02 UTC 2007


>Number:         116601
>Category:       ports
>Synopsis:       [patch] bsd.port.mk - fail if dependency failed
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Mon Sep 24 10:20:01 GMT 2007
>Closed-Date:
>Last-Modified:
>Originator:     Edwin Groothuis
>Release:        FreeBSD 6.2-RELEASE-p4 i386
>Organization:
-
>Environment:
System: FreeBSD k7.mavetju 6.2-RELEASE-p4 FreeBSD 6.2-RELEASE-p4 #0: Thu Apr 26 17:55:55 UTC 2007 root at i386-builder.daemonology.net:/usr/obj/usr/src/sys/SMP i386


>Description:

Right now the ports framework skips over failed dependencies if
they don't install the right file:

===>   dynagen-devel-0.10.1 depends on executable: dynamips-devel - not found
===>    Verifying install for dynamips-devel in /usr/ports/emulators/dynamips-devel
===>   Returning to build of dynagen-devel-0.10.1
===>   dynagen-devel-0.10.1 depends on file: /usr/local/bin/python2.5 - found

It should have stopped at stopped there, and not continued.

LIB_DEPENDS does do this properly.


This only happens in polluted build-environments where work/.build_done
of a dependency exists and therefor skips the installation. Both
of them shouldn't happen :-)

>How-To-Repeat:
>Fix:

--- bsd.port.mk.orig	Mon Sep 24 09:10:01 2007
+++ bsd.port.mk	Mon Sep 24 10:08:40 2007
@@ -4812,6 +4812,7 @@
 					fi; \
 				fi; \
 			else \
+				fileneeded="$$prog"; \
 				${ECHO_MSG} "===>   ${PKGNAME} depends on file: $$prog - not found"; \
 				notfound=1; \
 			fi; \
@@ -4830,6 +4831,7 @@
 						notfound=0; \
 					fi; \
 				else \
+					pkgneeded="$$prog"; \
 					${ECHO_MSG} "===>   ${PKGNAME} depends on package: $$prog - not found"; \
 					notfound=1; \
 				fi; \
@@ -4852,6 +4854,7 @@
 					notfound=0; \
 				fi; \
 			else \
+				execneeded="$$prog"; \
 				${ECHO_MSG} "===>   ${PKGNAME} depends on executable: $$prog - not found"; \
 				notfound=1; \
 			fi; \
@@ -4862,6 +4865,22 @@
 				${ECHO_MSG} "     => No directory for $$prog.  Skipping.."; \
 			else \
 				${_INSTALL_DEPENDS} \
+				if [ ! -z "$$fileneeded" ]; then \
+					if [ ! -e "$$prog" ]; then \
+						${ECHO_MSG} "Error: file \"$$prog\" does not exist"; \
+						${FALSE}; \
+					fi; \
+				elif [ ! -z "$$pkgneeded" ]; then \
+					if ! ${PKG_INFO} "$$prog" > /dev/null 2>&1 ; then \
+						${ECHO_MSG} "Error: package \"$$prog\" does not exist"; \
+						${FALSE}; \
+					fi; \
+				elif [ ! -z "$$execneeded" ]; then \
+					if ! ${WHICH} "$$prog" > /dev/null 2>&1 ; then \
+						${ECHO_MSG} "Error: executable \"$$prog\" does not exist"; \
+						${FALSE}; \
+					fi; \
+				fi; \
 			fi; \
 		fi; \
 	done
>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list