Subject: wtf is perl
To: None <tech-userlevel@netbsd.org>
From: Geert Hendrickx <geert.hendrickx@ua.ac.be>
List: tech-userlevel
Date: 06/16/2005 15:58:25
--6TrnltStXW4iwmi0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

... would work if you apply the patch from PR bin/30539. :-)  

% wtf is perl
perl: Practical Extraction and Report Language

It makes wtf(6) also check the PKG_DBDIR, a.k.a. /var/db/pkg.  Useful if
you're wondering what that "libfoo" package is... :-)  

% wtf is libgsf
libgsf: GNOME2 structured file library

GH

-- 
:wq

--6TrnltStXW4iwmi0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="wtf.diff"

--- src/games/wtf/wtf	2003-04-25 21:08:31.000000000 +0200
+++ src/games/wtf/wtf	2005-06-16 15:15:26.000000000 +0200
@@ -57,8 +57,13 @@
 		if [ $? -eq 0 ] ; then
 			echo "$1: $ans"
 		else
-			echo "Gee...  I don't know what $1 means..." 1>&2
-			rv=1
+			ans=`cat ${PKG_DBDIR:=/var/db/pkg}/${1}-[0-9]*/+COMMENT 2> /dev/null`
+			if [ $? -eq 0 ] ; then
+				echo "$1: $ans"
+			else
+				echo "Gee...  I don't know what $1 means..." 1>&2
+				rv=1
+			fi
 		fi
 	fi
 	shift

--6TrnltStXW4iwmi0--