From owner-freebsd-ports@FreeBSD.ORG Sun Jun 17 10:01:42 2007 Return-Path: X-Original-To: ports@freebsd.org Delivered-To: freebsd-ports@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C8A8916A41F; Sun, 17 Jun 2007 10:01:42 +0000 (UTC) (envelope-from alexander@leidinger.net) Received: from redbull.bpaserver.net (redbullneu.bpaserver.net [213.198.78.217]) by mx1.freebsd.org (Postfix) with ESMTP id 3176113C44B; Sun, 17 Jun 2007 10:01:42 +0000 (UTC) (envelope-from alexander@leidinger.net) Received: from outgoing.leidinger.net (p54A5EC86.dip.t-dialin.net [84.165.236.134]) by redbull.bpaserver.net (Postfix) with ESMTP id 8A12E2E24D; Sun, 17 Jun 2007 12:01:38 +0200 (CEST) Received: from deskjail (deskjail.Leidinger.net [192.168.1.109]) by outgoing.leidinger.net (Postfix) with ESMTP id 8EEE15B49F3; Sun, 17 Jun 2007 12:01:20 +0200 (CEST) Date: Sun, 17 Jun 2007 12:02:05 +0200 From: Alexander Leidinger To: pav@freebsd.org Message-ID: <20070617120205.798f933d@deskjail> X-Mailer: Claws Mail 2.9.2 (GTK+ 2.10.12; i386-portbld-freebsd7.0) Mime-Version: 1.0 Content-Type: multipart/mixed; boundary=MP_iFhNvAf96RVYidA8HDGU2Hx X-BPAnet-MailScanner-Information: Please contact the ISP for more information X-BPAnet-MailScanner: Found to be clean X-BPAnet-MailScanner-SpamCheck: not spam, SpamAssassin (not cached, score=0.677, required 8, DKIM_POLICY_SIGNSOME 0.00, RDNS_DYNAMIC 0.10, TW_KG 0.08, VOWEL_TOCC_5 0.50) X-BPAnet-MailScanner-From: alexander@leidinger.net X-Spam-Status: No Cc: ports@freebsd.org, portmgr@freebsd.org Subject: The committed package speedup is a little bit flawed X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Jun 2007 10:01:42 -0000 --MP_iFhNvAf96RVYidA8HDGU2Hx Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi, somehow you didn't got the final patch. Attached is the fastest version we where able to come up with. Additionally it contains a safety net ("-gt" part) in case there's something wrong (no ORIGIN in +CONTENTS). With the current version you run into an error, with the patch you don't. It also contains the possibility to only record explicit package dependencies instead of all implicit dependencies too (you have to set EXPLICIT_PACKAGE_DEPENDS to some value to change the current default behavior). This allows to experiment with explicit package dependencies. If you don't like this part, just remove the -a -z "${EXPLICIT_PACKAGE_DEPENDS}" On a related note, have you got a PR for the "make clean"-speedup? Interested parties can find "inofficial" (as in "not in GNATS for portmgr testing") patches for this and some more bsd.port.mk improvements for testing at: http://www.Leidinger.net/FreeBSD/port-patches/ Bye, Alexander. -- "man hier" will explain the way FreeBSD filesystems are normally laid out. -- David Scheidt http://www.Leidinger.net Alexander @ Leidinger.net: PGP ID = B0063FE7 http://www.FreeBSD.org netchild @ FreeBSD.org : PGP ID = 72077137 --MP_iFhNvAf96RVYidA8HDGU2Hx Content-Type: text/x-patch; name=bsd.port.mk.diff Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=bsd.port.mk.diff Index: Mk/bsd.port.mk =================================================================== RCS file: /import/FreeBSD-CVS/ports/Mk/bsd.port.mk,v retrieving revision 1.569 diff -u -r1.569 bsd.port.mk --- Mk/bsd.port.mk 16 Jun 2007 19:07:42 -0000 1.569 +++ Mk/bsd.port.mk 17 Jun 2007 09:49:52 -0000 @@ -5380,23 +5533,20 @@ ACTUAL-PACKAGE-DEPENDS?= \ if [ "${_LIB_RUN_DEPENDS}" != " " ]; then \ - for pkgname in ${PKG_DBDIR}/*; do \ + origins=$$(for pkgname in ${PKG_DBDIR}/*; do \ if [ -e $$pkgname/+CONTENTS ]; then \ - a=$${pkgname\#\#*/}; \ - b=`${SED} -n -e "s/@comment ORIGIN://p" $$pkgname/+CONTENTS`; \ - if [ ! -z $$b ]; then \ - origins="$$origins $$a $$b"; \ - fi; \ + ${ECHO_CMD} $${pkgname\#\#*/}; \ + ${SED} -n -e "s/@comment ORIGIN://p" $$pkgname/+CONTENTS; \ fi; \ - done; \ + done); \ for dir in ${_LIB_RUN_DEPENDS:C,[^:]*:([^:]*):?.*,\1,}; do \ tmp=$${dir%/*}; \ dir=$${tmp\#\#*/}/$${dir\#\#*/}; \ set -- $$origins; \ - while [ $$\# != 0 ]; do \ - if [ $$dir = $$2 ]; then \ + while [ $$\# -gt 1 ]; do \ + if [ "$$dir" = "$$2" ]; then \ ${ECHO_CMD} $$1:$$dir; \ - if [ -e ${PKG_DBDIR}/$$1/+CONTENTS ]; then \ + if [ -e ${PKG_DBDIR}/$$1/+CONTENTS -a -z "${EXPLICIT_PACKAGE_DEPENDS}" ]; then \ packagelist="$$packagelist ${PKG_DBDIR}/$$1/+CONTENTS"; \ fi; \ break; \ --MP_iFhNvAf96RVYidA8HDGU2Hx--