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

scher at FreeBSD.org scher at FreeBSD.org
Wed May 30 22:06:17 UTC 2012


Author: scher
Date: Wed May 30 22:06:15 2012
New Revision: 236771
URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=236771

Log:
  [new_feature] bsd.parallel.mk: new target for checking conflicts with currently
  	installing ports
  	bsd.port.mk: new checking conflicts target is integrated
  

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

Modified: soc2012/scher/par_ports/head/Mk/bsd.parallel.mk
==============================================================================
--- soc2012/scher/par_ports/head/Mk/bsd.parallel.mk	Wed May 30 21:28:37 2012	(r236770)
+++ soc2012/scher/par_ports/head/Mk/bsd.parallel.mk	Wed May 30 22:06:15 2012	(r236771)
@@ -261,6 +261,34 @@
 check-lock:
 	@( pkg_name=${PKGNAME}; ${_parv_CHECK_LOCK} ) || { ${_parv_ON_LOCK_EXIT_SEQ}; }
 
+check-active-build-conflicts:
+.if ( defined(CONFLICTS) || defined(CONFLICTS_BUILD) || defined(CONFLICTS_INSTALL)) && !defined(DISABLE_CONFLICTS)
+	@conflicts_with=; \
+	active_builds=$$(cd ${LOCK_DIR}; ${LS} -dA ${CONFLICTS} ${CONFLICTS_BUILD} ${CONFLICTS_INSTALL} 2> /dev/null || ); \
+	for entry in $${active_builds}; do \
+		( pkg_name=$${entry}; ${_parv_CHECK_LOCK} ) || { \
+			status=$$?; \
+			if [ $${status} -eq ${_parv_ON_LOCK_EXIT_STATUS} ]; then \
+				conflicts_with="$${conflicts_with} $${entry}"; \
+			else \
+				exit 1; \
+			fi; \
+		}; \
+	done; \
+	if [ -n "$${conflicts_with}" ]; then \
+		${_dparv_START_OUTPUT}; \
+		${ECHO_MSG}; \
+		${ECHO_MSG} "===>  ${PKGNAME} conflicts with currently installing package(s): "; \
+		for entry in $${conflicts_with}; do \
+			${ECHO_MSG} "      $${entry}"; \
+		done; \
+		${ECHO_MSG}; \
+		${ECHO_MSG} "      Please remove them first with pkg_delete(1)."; \
+		${_dparv_END_OUTPUT}; \
+		exit 1; \
+	fi
+.endif
+
 lock-pkg-dbdir:
 	@attempts=-1; ${_parv_PKG_DBDIR_LOCK_LOOP}
 

Modified: soc2012/scher/par_ports/head/Mk/bsd.port.mk
==============================================================================
--- soc2012/scher/par_ports/head/Mk/bsd.port.mk	Wed May 30 21:28:37 2012	(r236770)
+++ soc2012/scher/par_ports/head/Mk/bsd.port.mk	Wed May 30 22:06:15 2012	(r236771)
@@ -1137,6 +1137,20 @@
 .include "${PORTSDIR}/Mk/bsd.parallel.mk"
 .endif
 
+.if !target(lock-pkg-dbdir)
+lock-pkg-dbdir:
+	@{DO_NADA}
+.endif
+
+.if !target(unlock-pkg-dbdir)
+unlock-pkg-dbdir:
+	@{DO_NADA}
+.endif
+
+.if !target(check-active-build-conflicts)
+check-active-build-conflicts:
+	@{DO_NADA}
+.endif
 ############### ENDF OF PAR_PORTS SPECIFIC COMMENT LINE  ###############
 
 #
@@ -3807,7 +3821,7 @@
 # Check conflicts
 
 .if !target(check-conflicts)
-check-conflicts: check-build-conflicts check-install-conflicts
+check-conflicts: check-active-build-conflicts check-build-conflicts check-install-conflicts
 .endif
 
 .if !target(check-build-conflicts)
@@ -4324,7 +4338,7 @@
 .endif
 _SANITY_SEQ=	${_CHROOT_SEQ} pre-everything check-makefile \
 				check-categories check-makevars check-desktop-entries \
-				check-depends identify-install-conflicts check-deprecated \
+				check-depends check-active-build-conflicts identify-install-conflicts check-deprecated \
 				check-vulnerable check-license buildanyway-message \
 				options-message
 


More information about the svn-soc-all mailing list