socsvn commit: r238493 - soc2012/scher/par_ports/head/Mk

scher at FreeBSD.org scher at FreeBSD.org
Thu Jun 28 19:06:18 UTC 2012


Author: scher
Date: Thu Jun 28 19:06:16 2012
New Revision: 238493
URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=238493

Log:
  [bugfix] XXX_DEPENDS patterns are "path:dir[:target]" but
  	${_parv_PRINT_ACTIVE_BUILDS} ${_PROCESS_ACTIVE_BUILDS}
  	${_parv_CHECK_ALL_DEPS_LOCKED} did not consider "[:target] part.
  	Now this scripts consider this part of pattern.
  

Modified:
  soc2012/scher/par_ports/head/Mk/bsd.parallel.mk

Modified: soc2012/scher/par_ports/head/Mk/bsd.parallel.mk
==============================================================================
--- soc2012/scher/par_ports/head/Mk/bsd.parallel.mk	Thu Jun 28 18:52:40 2012	(r238492)
+++ soc2012/scher/par_ports/head/Mk/bsd.parallel.mk	Thu Jun 28 19:06:16 2012	(r238493)
@@ -399,7 +399,10 @@
 _parv_PRINT_ACTIVE_BUILDS= \
 	${ECHO_CMD} "     Currently building dependency ports are"; \
 	for build in $$( ${ECHO_CMD} "$${active_builds}" ); do \
-		dir=$${build\#\#*:}; \
+		dep=$${build\#*:}; \
+		dir=$${dep\#*:}; \
+		target=$${dep\#\#*:}; \
+		[ $$dir != $$target ] && dir=$${dir%%:*}; \
 		${ECHO_CMD} "         $$(cd $${dir}; ${MAKE} -V PKGNAME)"; \
 	done
 
@@ -418,6 +421,9 @@
 			pid=$${build%%:*}; \
 			dep=$${build\#*:}; \
 			ps -p $${pid} > /dev/null || { \
+				dir=$${dep\#*:}; \
+				target=$${dep\#\#*:}; \
+				[ $$dir != $$target ] && dir=$${dir%%:*}; \
 				wait $${pid} && status=$$? || status=$$?; \
 				if [ $${status} -eq 0 ]; then \
 					active_builds="$${active_builds%%$${build}*} $${active_builds\#\#*$${build}}"; \
@@ -431,18 +437,18 @@
 							${FALSE}; \
 						fi; \
 					fi; \
-					${ECHO_CMD} "=====> $$(cd $${build\#\#*:}; ${MAKE} -V PKGNAME) is installed"; \
+					${ECHO_CMD} "=====> $$(cd $${dir}; ${MAKE} -V PKGNAME) is installed"; \
 				elif [ $${status} -eq ${_parv_MAKE_LOCK_EXIT_STATUS} ]; then \
-					${ECHO_CMD} "===> $$(cd $${build\#\#*:}; ${MAKE} -V PKGNAME) is locked. Unable to start build."; \
+					${ECHO_CMD} "===> $$(cd $${dir}; ${MAKE} -V PKGNAME) is locked. Unable to start build."; \
 					active_builds="$${active_builds%%$${build}*} $${active_builds\#\#*$${build}}"; \
 					active_builds=$$( echo "$${active_builds}" | sed 's/^[[:space:]]*//' | sed 's/[[:space:]]*$$//' ); \
 					builds_num=$$(( $${builds_num} - 1 )); \
 					depends="$${depends} $${dep}"; \
 					depends=$$( echo "$${depends}" | sed 's/^[[:space:]]*//' | sed 's/[[:space:]]*$$//' ); \
 				else \
-					${ECHO_CMD} "Errors occured while building a dependency port $$(cd $${build\#\#*:}; ${MAKE} -V PKGNAME)"; \
+					${ECHO_CMD} "Errors occured while building a dependency port $$(cd $${dir}; ${MAKE} -V PKGNAME"; \
 					${ECHO_CMD} "Checkout its log"; \
-					${ECHO_CMD} "    $$(dir=$${build\#\#*:}; ${ECHO_CMD} ${_parv_PORTS_LOGS_DIR}/${_parv_PORT_LOG_FILE})"; \
+					${ECHO_CMD} "    ${_parv_PORTS_LOGS_DIR}/${_parv_PORT_LOG_FILE})"; \
 					${ECHO_CMD} "Terminating..."; \
 					exit 1; \
 				fi; \
@@ -472,6 +478,8 @@
 		while true; do \
 			for dep in $${depends}; do \
 				dir=$${dep\#*:}; \
+				target=$${dep\#\#*:}; \
+				[ $$dir != $$target ] && dir=$${dir%%:*}; \
 				{ (cd $${dir}; ${MAKE} check-lock > /dev/null 2> /dev/null & wait $$! ) \
 					&& break 2 || continue; }; \
 			done; \


More information about the svn-soc-all mailing list