ports/180725: [PATCH] bsd.port.mk: Allow builds to fail when package dependencies do not exist
Chris Rees
crees at physics.org
Sun Jul 21 17:50:04 UTC 2013
>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 at 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:
More information about the freebsd-ports-bugs
mailing list