Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 28 Jun 2012 10:28:03 +0000
From:      scher@FreeBSD.org
To:        svn-soc-all@FreeBSD.org
Subject:   socsvn commit: r238461 - soc2012/scher/par_ports/head/Mk
Message-ID:  <20120628102803.23536106564A@hub.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: scher
Date: Thu Jun 28 10:28:02 2012
New Revision: 238461
URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=238461

Log:
  [new_feature] Declarations of _parv_PORTS_LOGS_DIR and _parv_PORT_LOG_FILE vars
  [fixed/new_feature] _parv_CHECK_DIRS_SANITY - script to check existence of some
  	directories.
  	Reason: few lines of code in bsd.port.mk
  

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	Thu Jun 28 09:18:11 2012	(r238460)
+++ soc2012/scher/par_ports/head/Mk/bsd.parallel.mk	Thu Jun 28 10:28:02 2012	(r238461)
@@ -129,11 +129,10 @@
 .endfor
 .endif #!{.TARGETS}
 
+.if !defined(_parv_DEFAULT_PAR_BUILDS_NUM) 
 _parv_DEFAULT_PAR_BUILDS_NUM!= ${SYSCTL} -n kern.smp.cpus
-############### THIS ENTRY IS FOR DEBUGGING PURPOSE  ###############
-############### Custom number of parallel builds for debugging
-_parv_DEFAULT_PAR_BUILDS_NUM= 3
-############### END OF PAR_PORTS SPECIFIC COMMENT LINE  ###############
+.endif
+
 .if !defined(_parv_PARALLEL_BUILDS_NUMBER) || ${_parv_PARALLEL_BUILDS_NUMBER} > ${_parv_DEFAULT_PAR_BUILDS_NUM}
 _parv_PARALLEL_BUILDS_NUMBER= ${_parv_DEFAULT_PAR_BUILDS_NUM}
 .endif
@@ -141,10 +140,14 @@
 #####################################################
 # Locking variables and tools
 
-LOCK_DIR= /var/db/portlocks
+# TODO: docs is needed
+_parv_PORTS_LOGS_DIR?= /tmp/portslogs
+LOCK_DIR?= /var/db/portslocks
 _parv_PKG_DBDIR_LOCK_FILE= .lock
 _parv_PORT_DBDIR_LOCK_FILE= .lock
 _parv_LOCK_DIR_LOCK_FILE= ${PKGNAME}
+# TODO: docs is needed
+_parv_PORT_LOG_FILE= ${PKGNAME}
 
 _parv_WAIT_FOR_LOCK_TIME?= 5
 _parv_WAIT_FOR_UNLOCK_TIME?= 15
@@ -159,6 +162,20 @@
 
 _parv_MAKE_LOCK_EXIT_STATUS= 158
 
+_parv_CHECK_DIRS_SANITY= \
+	if [ ! -d ${LOCK_DIR} ]; then \
+		${_dparv_START_OUTPUT}; \
+		${ECHO_CMD} "Creating ports locks dir"; \
+		${_dparv_END_OUTPUT}; \
+		${MKDIR} ${LOCK_DIR}; \
+	fi; \
+	if [ ! -d ${_parv_PORTS_LOGS_DIR} ]; then \
+		${_dparv_START_OUTPUT}; \
+		${ECHO_CMD} "Creating ports logs dir"; \
+		${_dparv_END_OUTPUT}; \
+		${MKDIR} ${_parv_PORTS_LOGS_DIR}; \
+	fi
+
 .for _lock_dir in PKG_DBDIR PORT_DBDIR LOCK_DIR
 # ${${_lock_dir}} == ${PKG_DBDIR} OR ${LOCK_DIR}
 
@@ -484,6 +501,8 @@
 # Parallel targets section
 # TODO: outline intergation with bsd.port.mk
 #
+
+#TODO doc is needed
 .if !defined(INSTALLS_DEPENDS)
 check-license-depends: check-license-message
 	@license_to_ask=""; \
@@ -514,6 +533,7 @@
 check-license-message:
 	@${ECHO_MSG} "===> Checking out licenses for ${PKGNAME} dependencies";
 
+#TODO doc is needed
 .if !defined(CONFIG_DONE_${UNIQUENAME:U}) && !defined(INSTALLS_DEPENDS)
 locking-config-recursive: locking-config-message lock-port-dbdir config-recursive unlock-port-dbdir
 .endif
@@ -522,6 +542,7 @@
 	@${ECHO_MSG} "===> Setting user-specified options for ${PKGNAME} and dependencies";
 
 # TODO: doc is needed
+# TODO: shift to the beginning 
 _parv_CHECKED_CONFIG_F_PREFIX= already-checked-config
 
 config-recursive: config-conditional

Modified: soc2012/scher/par_ports/head/Mk/bsd.port.mk
==============================================================================
--- soc2012/scher/par_ports/head/Mk/bsd.port.mk	Thu Jun 28 09:18:11 2012	(r238460)
+++ soc2012/scher/par_ports/head/Mk/bsd.port.mk	Thu Jun 28 10:28:02 2012	(r238461)
@@ -1559,12 +1559,7 @@
 .if defined(_parv_WANT_PARALLEL_BUILD) || !defined(IGNORE_PATH_CHECKS)
 .BEGIN:
 .	if defined(_parv_WANT_PARALLEL_BUILD)
-	@if [ ! -d ${LOCK_DIR} ]; then \
-		${_dparv_START_OUTPUT}; \
-		${ECHO_CMD} "Creating lock dir"; \
-		${_dparv_END_OUTPUT}; \
-		${MKDIR} ${LOCK_DIR}; \
-	fi
+	@${_parv_CHECK_DIRS_SANITY}
 .		if ${_parv_IS_DEFAULT_TARGET}
 .			if defined(INSTALLS_DEPENDS)
 	@( ${_parv_LOCK_DIR_LOCK_LOOP} ) || { ${_parv_ON_LOCK_EXIT_SEQ}; }



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20120628102803.23536106564A>