Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 22 Mar 2013 13:57:14 +0100 (CET)
From:      Emanuel Haupt <ehaupt@FreeBSD.org>
To:        FreeBSD-gnats-submit@freebsd.org
Subject:   ports/177230: add bsd.port.mk target to list the package name of missing dependencies
Message-ID:  <201303221257.r2MCvE94055332@freefall.freebsd.org>
Resent-Message-ID: <201303221300.r2MD00VS055424@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         177230
>Category:       ports
>Synopsis:       add bsd.port.mk target to list the package name of missing dependencies
>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:   Fri Mar 22 13:00:00 UTC 2013
>Closed-Date:
>Last-Modified:
>Originator:     Emanuel Haupt
>Release:        FreeBSD 10.0-CURRENT amd64
>Organization:
>Environment:
System: FreeBSD freefall.freebsd.org 10.0-CURRENT FreeBSD 10.0-CURRENT #0 r247807: Mon Mar 4 19:35:47 UTC 2013 peter@freefall.freebsd.org:/usr/obj/usr/src/sys/FREEFALL amd64


	
>Description:
Add a bsd.port.mk target to list the package name of missing dependencies
similar to 'missing'. With pkgng this would be beneficial if you wanted to
install missing dependencies of a port you're trying to build, for instance
in a jails:

$ make missing-packages | xargs pkg install -y

So far with the old pkg_* tools this was achieved with:

$ make missing | xargs portmaster -PP


>How-To-Repeat:
	
>Fix:

	

--- bsd.port.mk.patch begins here ---
Index: bsd.port.mk
===================================================================
--- bsd.port.mk	(revision 314920)
+++ bsd.port.mk	(working copy)
@@ -5526,6 +5526,16 @@
 		fi; \
 	done
 
+# Show package name of missing dependencies
+missing-packages:
+	@_packages=$$(${PKG_INFO} -aq); \
+	for dir in $$(${ALL-DEPENDS-LIST}); do \
+		_p=$$(cd $$dir; ${MAKE} -VPKGNAME); \
+		if ! $$(${ECHO_CMD} $${_packages} | ${GREP} -q $${_p}); then \
+			${ECHO_CMD} $${_p}; \
+		fi; \
+	done
+
 ################################################################
 # Everything after here are internal targets and really
 # shouldn't be touched by anybody but the release engineers.
--- bsd.port.mk.patch ends here ---


>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201303221257.r2MCvE94055332>