Subject: pkg/22734: pkg_chk TAGS don't agree with the manual page
To: None <gnats-bugs@gnats.netbsd.org>
From: None <eric@cirr.com>
List: netbsd-bugs
Date: 09/09/2003 14:37:27
>Number:         22734
>Category:       pkg
>Synopsis:       pkg_chk doesn't agree with it's manual page
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Sep 09 19:38:00 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator:     Eric Schnoebelen
>Release:        NetBSD 1.6.1_STABLE
>Organization:
Central Iowa (Model) Railroad, Plano, TX US
>Environment:
System: NetBSD www.dfwuug.org 1.6.1_STABLE NetBSD 1.6.1_STABLE (GENERIC) #0: Fri Sep 5 14:55:30 CDT 2003 root@www.dfwuug.org:/usr/obj/alpha/sys/arch/alpha/compile/GENERIC alpha
Architecture: alpha
Machine: alpha
>Description:
	The installed pkg_chk manual page claims the following values
	are automatically included as TAGS:
		hostname -s,
		hostname,
		uname -srm,
		uname -sr,
		uname -sm,
		uname -s,
		uname -r,
		uname -m
	however, emperical testing (as well as code reading) says that
	only the short hostname (hostname -s) is used/generated as a tag,
	leaving the possible FQDN (as defined by hostname) out of the
	list.

>How-To-Repeat:
	# hostname www.foo.com
	## create a pkgchk.conf file consisting of items tagged with
	## www.foo.com
	# pkg_chk -C pkgchk.com -a -u -v
	## watch pkg_chk not match anything.
>Fix:
cvs server: Diffing .
cvs server: Diffing files
Index: files/pkgchk.sh
===================================================================
RCS file: /cvsroot/pkgsrc/pkgtools/pkgchk/files/pkgchk.sh,v
retrieving revision 1.42
diff -b -u -w -r1.42 pkgchk.sh
--- files/pkgchk.sh	19 Jun 2003 13:37:01 -0000	1.42
+++ files/pkgchk.sh	9 Sep 2003 19:36:08 -0000
@@ -350,7 +350,7 @@
 
     # Determine list of tags
     #
-    TAGS="`hostname | sed -e 's,\..*,,'`,`uname -srm | ${AWK} '{print $1"-"$2"-"$3","$1"-"$2","$1"-"$3","$1","$2","$3}'`"
+    TAGS="`hostname | sed -e 's,\..*,,'`,`hostname`,`uname -srm | ${AWK} '{print $1"-"$2"-"$3","$1"-"$2","$1"-"$3","$1","$2","$3}'`"
     if [ -f /usr/X11R6/lib/libX11.so -o -f /usr/X11R6/lib/libX11.a ];then
 	TAGS="$TAGS,x11"
     fi
>Release-Note:
>Audit-Trail:
>Unformatted: