From owner-svn-soc-all@FreeBSD.ORG Thu Jun 28 10:28:05 2012 Return-Path: Delivered-To: svn-soc-all@FreeBSD.org Received: from socsvn.FreeBSD.org (unknown [IPv6:2001:4f8:fff6::2f]) by hub.freebsd.org (Postfix) with SMTP id 23536106564A for ; Thu, 28 Jun 2012 10:28:03 +0000 (UTC) (envelope-from scher@FreeBSD.org) Received: by socsvn.FreeBSD.org (sSMTP sendmail emulation); Thu, 28 Jun 2012 10:28:03 +0000 Date: Thu, 28 Jun 2012 10:28:03 +0000 From: scher@FreeBSD.org To: svn-soc-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Message-Id: <20120628102803.23536106564A@hub.freebsd.org> Cc: Subject: socsvn commit: r238461 - soc2012/scher/par_ports/head/Mk X-BeenThere: svn-soc-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the entire Summer of Code repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Jun 2012 10:28:05 -0000 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}; }