From owner-freebsd-ports@FreeBSD.ORG Thu Aug 10 17:55:50 2006 Return-Path: X-Original-To: ports@FreeBSD.org Delivered-To: freebsd-ports@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DBD4D16A4F0; Thu, 10 Aug 2006 17:55:50 +0000 (UTC) (envelope-from jhein@timing.com) Received: from Daffy.timing.com (smtp.timing.com [206.168.13.218]) by mx1.FreeBSD.org (Postfix) with ESMTP id 28D0043D4C; Thu, 10 Aug 2006 17:55:50 +0000 (GMT) (envelope-from jhein@timing.com) Received: from gromit.timing.com (gromit.timing.com [206.168.13.209]) by Daffy.timing.com (8.13.1/8.13.1) with ESMTP id k7AHtnS2045435; Thu, 10 Aug 2006 11:55:49 -0600 (MDT) (envelope-from jhein@timing.com) Received: from gromit.timing.com (localhost [127.0.0.1]) by gromit.timing.com (8.13.6/8.13.6) with ESMTP id k7AHthnp089512; Thu, 10 Aug 2006 11:55:43 -0600 (MDT) (envelope-from jhein@gromit.timing.com) Received: (from jhein@localhost) by gromit.timing.com (8.13.6/8.13.6/Submit) id k7AHthuX089509; Thu, 10 Aug 2006 11:55:43 -0600 (MDT) (envelope-from jhein) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <17627.29470.997143.560213@gromit.timing.com> Date: Thu, 10 Aug 2006 11:55:42 -0600 From: John E Hein To: Brooks Davis In-Reply-To: <20060810140529.GB20275@lor.one-eyed-alien.net> References: <17626.25183.846983.515718@gromit.timing.com> <17626.25444.563099.956775@gromit.timing.com> <44DA6FC9.3040404@FreeBSD.org> <17626.29481.909830.326948@gromit.timing.com> <17626.30422.650339.960580@gromit.timing.com> <20060810132105.GA20275@lor.one-eyed-alien.net> <44DB33D2.4070308@FreeBSD.org> <20060810140529.GB20275@lor.one-eyed-alien.net> X-Mailer: VM 7.19 under Emacs 21.3.1 X-Virus-Scanned: ClamAV version 0.87.1, clamav-milter version 0.87 on Daffy.timing.com X-Virus-Status: Clean Cc: ports@FreeBSD.org, G?bor K?vesd?n Subject: Re: support for DESTDIR: security/openssh-portable 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: Thu, 10 Aug 2006 17:55:50 -0000 Brooks Davis wrote at 09:05 -0500 on Aug 10, 2006: > My inclination would be something like: > > PKG_INSTALL_TEMP=`mktemp ${DESTDIR}/tmp/pkg_install` && \ > (${CAT} ${PKG_INSTALL} > ${PKG_INSTALL_TEMP}; \ > ${SH} ${PKG_INSTALL_TEMP}; \ > ${RM} ${PKG_INSTALL_TEMP}) I would just put PKG_INSTALL_TEMP in WRKDIR and not worry about mktemp & rm. I do something similar in my local tree for a pkg-install that is slightly different when run from the 'install' target than the one installed in PKG_DBDIR. > I think we should ideally introduce a feature to allow ports to > automatically run pkg-install and stuff the code in bsd.port.mk so > ports don't have to know about DESTDIR in this case. Yes. That'd be nice. > Actually, ports where pkg-install and the pre/post-install targets > duplicate code (often slightly differently) drive me nuts so I'd > prefer a NO_AUTOPKGINSTALL, but that would take some real work so a > positive flag is probably better initially. Agreed. That duplication is definitely a candidate for cleanup.