ports/169301: [PATCH] ports-mgmt/wanted-ports: Add PKGNG support
Bryan Drewery
bryan at shatow.net
Thu Jun 21 20:00:28 UTC 2012
>Number: 169301
>Category: ports
>Synopsis: [PATCH] ports-mgmt/wanted-ports: Add PKGNG support
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: update
>Submitter-Id: current-users
>Arrival-Date: Thu Jun 21 20:00:26 UTC 2012
>Closed-Date:
>Last-Modified:
>Originator: Bryan Drewery
>Release: FreeBSD 8.3-RELEASE i386
>Organization:
>Environment:
>Description:
wanted-ports depends on pkg_info(1) and currently does not work when using PKGNG. This patch adds support for pkgng by using pkg(8) if WITH_PKGNG is set in /etc/make.conf.
>How-To-Repeat:
>Fix:
--- patch-wanted-ports-pkgng.txt begins here ---
diff -ru ../wanted-ports.orig/Makefile ./Makefile
--- ../wanted-ports.orig/Makefile 2012-02-09 11:09:50.000000000 -0600
+++ ./Makefile 2012-06-21 14:52:19.000000000 -0500
@@ -7,7 +7,7 @@
# port is self-contained in the files directory.
PORTNAME= wanted-ports
-PORTVERSION= 0.1
+PORTVERSION= 0.2
#PORTREVISION is set from ${CFGFILE}
CATEGORIES= ports-mgmt
MASTER_SITES= # none
diff -ru ../wanted-ports.orig/files/wanted-ports.in ./files/wanted-ports.in
--- ../wanted-ports.orig/files/wanted-ports.in 2010-06-15 12:28:05.000000000 -0500
+++ ./files/wanted-ports.in 2012-06-21 14:47:40.000000000 -0500
@@ -280,7 +280,13 @@
# The currently installed version of %%PKGNAME%% -- accounting for any
# dynamic updates to PORTREVISION
-INSTALLED_PKG=$( pkg_info -Ex %%PKGNAME%% )
+WITH_PKGNG=$( make -f ${PORTSDIR}/Mk/bsd.port.mk -VWITH_PKGNG )
+if [ -n "${WITH_PKGNG}" ]; then
+ PKG_CMD="pkg info"
+else
+ PKG_CMD=pkg_info
+fi
+INSTALLED_PKG=$( ${PKG_CMD} -Ex wanted-ports-0.1 )
if [ -z $INSTALLED_PKG ] ; then
echo "${ME}: FATAL -- the package providing this script seems " \
--- patch-wanted-ports-pkgng.txt ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list