From owner-freebsd-ports-bugs@FreeBSD.ORG Sun Jul 21 17:50:04 2013 Return-Path: Delivered-To: freebsd-ports-bugs@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 0B3621F5 for ; Sun, 21 Jul 2013 17:50:04 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx1.freebsd.org (Postfix) with ESMTP id E4468B69 for ; Sun, 21 Jul 2013 17:50:03 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.7/8.14.7) with ESMTP id r6LHo2pg010349 for ; Sun, 21 Jul 2013 17:50:02 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.7/8.14.7/Submit) id r6LHo2N1010348; Sun, 21 Jul 2013 17:50:02 GMT (envelope-from gnats) Resent-Date: Sun, 21 Jul 2013 17:50:02 GMT Resent-Message-Id: <201307211750.r6LHo2N1010348@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Chris Rees Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id EBFE6182 for ; Sun, 21 Jul 2013 17:48:13 +0000 (UTC) (envelope-from crees@bayofrum.net) Received: from mk-outboundfilter-1.mail.uk.tiscali.com (mk-outboundfilter-1.mail.uk.tiscali.com [212.74.114.37]) by mx1.freebsd.org (Postfix) with ESMTP id 8D39DB50 for ; Sun, 21 Jul 2013 17:48:13 +0000 (UTC) Received: from host-2-102-104-150.as13285.net (HELO pegasus.bayofrum.net) ([2.102.104.150]) by smtp.pipex.tiscali.co.uk with ESMTP; 21 Jul 2013 18:47:57 +0100 Received: by pegasus.bayofrum.net (Postfix, from userid 1001) id CC02F2F6E8; Sun, 21 Jul 2013 18:47:45 +0100 (BST) Message-Id: <20130721174745.CC02F2F6E8@pegasus.bayofrum.net> Date: Sun, 21 Jul 2013 18:47:45 +0100 (BST) From: Chris Rees To: FreeBSD-gnats-submit@freebsd.org X-Send-Pr-Version: 3.113 Subject: ports/180725: [PATCH] bsd.port.mk: Allow builds to fail when package dependencies do not exist X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: Chris Rees List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Jul 2013 17:50:04 -0000 >Number: 180725 >Category: ports >Synopsis: [PATCH] bsd.port.mk: Allow builds to fail when package dependencies do not exist >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Sun Jul 21 17:50:02 UTC 2013 >Closed-Date: >Last-Modified: >Originator: Chris Rees >Release: FreeBSD 9.1-RELEASE-p4 amd64 >Organization: >Environment: System: FreeBSD pegasus.bayofrum.net 9.1-RELEASE-p4 FreeBSD 9.1-RELEASE-p4 #1 r252227M: Sat Jun 29 13:55:30 BST 2013 root@pegasus.bayofrum.net:/usr/obj/usr/src/sys/PEGASUS amd64 >Description: I'm working on improving the dependency code of Tinderbox, and it now uses USE_PACKAGE_DEPENDS with make [step]-depends to install the dependencies of a port that's building. Unfortunately, there is sometimes a dependency missing and although the error message is easy to recognise if you understand it, I'd prefer to have a more obvious error; compare the two logs below: Without patch: http://www.bayofrum.net/~crees/scratch/log.log With USE_PACKAGE_DEPENDS_ONLY=yes: http://www.bayofrum.net/~crees/scratch/loglog.log This will be set internally in Tinderbox, but I can't think of a way to do it without modifying the ports tree. >How-To-Repeat: >Fix: Add a USE_PACKAGE_DEPENDS_ONLY switch to force building to fail if a package for a dependency does not exist. While here, correct archaic and unclear style ([ X$v != X ] should be [ -n "$v" ]) --- use-package-depends-only.diff begins here --- Index: bsd.port.mk =================================================================== --- bsd.port.mk (revision 323405) +++ bsd.port.mk (working copy) @@ -4903,7 +4903,7 @@ .endif _INSTALL_DEPENDS= \ - if [ X${USE_PACKAGE_DEPENDS} != "X" ]; then \ + if [ -n "${USE_PACKAGE_DEPENDS}" ]; then \ subpkgfile=`(cd $$dir; ${MAKE} $$depends_args -V PKGFILE)`; \ subpkgname=$${subpkgfile%-*} ; \ subpkgname=$${subpkgname\#\#*/} ; \ @@ -4917,6 +4917,10 @@ else \ ${PKG_ADD} $${subpkgfile}; \ fi; \ + elif [ -n "${USE_PACKAGE_DEPENDS_ONLY}" ]; then \ + ${ECHO_MSG} "===> ${PKGNAME} depends on package: $${subpkgfile} - not found"; \ + ${ECHO_MSG} "===> USE_PACKAGE_DEPENDS_ONLY set - will not build from source"; \ + exit 1; \ else \ (cd $$dir; ${MAKE} -DINSTALLS_DEPENDS $$target $$depends_args) ; \ fi; \ --- use-package-depends-only.diff ends here --- -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. >Release-Note: >Audit-Trail: >Unformatted: