From owner-freebsd-ports Mon Mar 18 22:10:10 2002 Delivered-To: freebsd-ports@hub.freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 7F5C037B41A for ; Mon, 18 Mar 2002 22:10:01 -0800 (PST) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.6/8.11.6) id g2J6A1m31930; Mon, 18 Mar 2002 22:10:01 -0800 (PST) (envelope-from gnats) Received: from net2.dinoex.sub.org (net2.dinoex.de [212.184.201.182]) by hub.freebsd.org (Postfix) with ESMTP id 4D61F37B416 for ; Mon, 18 Mar 2002 22:00:29 -0800 (PST) Received: from home.dinoex.sub.org (home [217.6.200.196]) by net2.dinoex.sub.org (8.12.2/8.12.2) with ESMTP id g2J60MwA012367 for ; Tue, 19 Mar 2002 07:00:23 +0100 (CET) (envelope-from dm@home.dinoex.sub.org) Received: (from dm@localhost) by home.dinoex.sub.org (8.12.2/8.12.2/Submit) id g2J60Lvk051442; Tue, 19 Mar 2002 07:00:21 +0100 (CET) (envelope-from dm) Message-Id: <200203190600.g2J60Lvk051442@home.dinoex.sub.org> Date: Tue, 19 Mar 2002 07:00:21 +0100 (CET) From: dirk.meyer@dinoex.sub.org Reply-To: dirk.meyer@dinoex.sub.org To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Subject: ports/36083: Installs existing packages for dependecies Sender: owner-freebsd-ports@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org >Number: 36083 >Category: ports >Synopsis: Installs existing packages for dependecies >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Mon Mar 18 22:10:01 PST 2002 >Closed-Date: >Last-Modified: >Originator: Dirk Meyer >Release: FreeBSD 4.4-STABLE i386 >Organization: privat >Environment: System: FreeBSD 4.5-STABLE i386 >Description: While package build, dependencies are always build. This patch installs an existing package with correct version. >How-To-Repeat: This patch installs an existing package with correct version. to activate add to /etc/make.conf: USE_DEPENDED_PACKAGES=yes This feature might even be on by default. >Fix: apply a patch: --- bsd.port.mk.orig Sun Mar 17 00:37:02 2002 +++ bsd.port.mk Tue Mar 19 06:56:27 2002 @@ -522,6 +522,8 @@ # when you noticed the distfile you just fetched has # a different checksum and you intend to verify if # the port still works with it. +# USE_DEPENDED_PACKAGES - Install dependencies from existing packages instead +# of building it again. # Start of pre-makefile section. .if !defined(AFTERPORTMK) @@ -1217,6 +1219,7 @@ .endif PKG_CMD?= /usr/sbin/pkg_create +PKG_ADD?= /usr/sbin/pkg_add PKG_DELETE?= /usr/sbin/pkg_delete PKG_INFO?= /usr/sbin/pkg_info .if !defined(PKG_ARGS) @@ -2974,7 +2977,13 @@ if [ ! -d "$$dir" ]; then \ ${ECHO_MSG} " >> No directory for $$prog. Skipping.."; \ else \ - (cd $$dir; ${MAKE} $$target $$depends_args) ; \ + subpkgfile=`(cd $$dir; ${MAKE} $$depends_args -V PKGFILE)`; \ + if [ -r "$${subpkgfile}" -a X${USE_DEPENDED_PACKAGES} != "X" ]; then \ + ${ECHO_MSG} "===> Installing existing package $${subpkgfile}"; \ + ${PKG_ADD} $${subpkgfile}; \ + else \ + (cd $$dir; ${MAKE} $$target $$depends_args) ; \ + fi ; \ ${ECHO_MSG} "===> Returning to build of ${PKGNAME}"; \ fi; \ fi; \ >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message