From a629eef46aed43727eb8f6f1126262d8bcf3bc0e Mon Sep 17 00:00:00 2001 From: Matthew Seaman Date: Sat, 23 Jun 2012 15:18:29 +0000 Subject: [PATCH] - Make wanted-ports compatible with pkgng by dropping dependency on old pkg tools. Approved by: shaun (mentor) Submitted by: Bryan Drewery PR: ports/169301 --- ports-mgmt/wanted-ports/Makefile | 2 +- ports-mgmt/wanted-ports/files/wanted-ports.in | 10 ++-------- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/ports-mgmt/wanted-ports/Makefile b/ports-mgmt/wanted-ports/Makefile index 453a376edd15..c97e4ffd6f92 100644 --- a/ports-mgmt/wanted-ports/Makefile +++ b/ports-mgmt/wanted-ports/Makefile @@ -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 --git a/ports-mgmt/wanted-ports/files/wanted-ports.in b/ports-mgmt/wanted-ports/files/wanted-ports.in index c29af3232389..3be93c465421 100644 --- a/ports-mgmt/wanted-ports/files/wanted-ports.in +++ b/ports-mgmt/wanted-ports/files/wanted-ports.in @@ -2,7 +2,7 @@ # # $FreeBSD$ -# Copyright 2010 Matthew Seaman. All rights reserved. +# Copyright 2010,2012 Matthew Seaman. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions @@ -280,13 +280,7 @@ CONF_FILE=${WANTEDPORTSCFG:-/var/db/%%PORTNAME%%.conf} # The currently installed version of %%PKGNAME%% -- accounting for any # dynamic updates to PORTREVISION -INSTALLED_PKG=$( pkg_info -Ex %%PKGNAME%% ) - -if [ -z $INSTALLED_PKG ] ; then - echo "${ME}: FATAL -- the package providing this script seems " \ - "not to be installed" >&2 - exit 1 -fi +INSTALLED_PKG="%%PKGNAME%%" # # Handle Options -- Main Code Loop