Subject: pkg/6582: pkgtools version check in pkgsrc/mk/bsd.pkg.mk fix for nawk
To: None <gnats-bugs@gnats.netbsd.org>
From: None <woods@mail.weird.com>
List: netbsd-bugs
Date: 12/14/1998 17:54:09
>Number:         6582
>Category:       pkg
>Synopsis:       pkgtools version check in pkgsrc/mk/bsd.pkg.mk fix for use with nawk
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    gnats-admin (GNATS administrator)
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Mon Dec 14 15:05:01 1998
>Last-Modified:
>Originator:     Greg A. Woods
>Organization:
Planix, Inc.; Toronto, Ontario; Canada
>Release:        Mon Dec 14 08:08:34 EST 1998
>Environment:

	NetBSD

>Description:

	The check in pkgsrc/mk/bsd.pkg.mk for the pkgtools version won't
	work with The One True AWK -- the pattern matching syntax used
	is non-standard (regular expressions should be enclosed in slashes).

>How-To-Repeat:

	Replace /usr/bin/awk with BWK's AWK (eg. from pgksrc/lang/nawk)
	and try building something in pkgsrc.

>Fix:

	Apply this fix to pkgsrc/mk/bsd.pkg.mk:

Index: pkgsrc/mk/bsd.pkg.mk
===================================================================
RCS file: /cvs/NetBSD/pkgsrc/mk/bsd.pkg.mk,v
retrieving revision 1.1.1.10
diff -c -r1.1.1.10 bsd.pkg.mk
*** pkgsrc/mk/bsd.pkg.mk	1998/11/16 23:34:40	1.1.1.10
--- pkgsrc/mk/bsd.pkg.mk	1998/12/14 22:43:29
***************
*** 529,535 ****
  
  # Check that we're using up-to-date pkg_* tools with this file.
  .ifndef _PKGTOOLS_VER
! _PKGTOOLS_VER!= /usr/bin/ident ${PKG_CREATE} ${PKG_DELETE} ${PKG_INFO} ${PKG_ADD} | ${AWK} '$$1 ~ "\$$NetBSD" && $$2 !~ "^crt0" { gsub("/", "", $$4); print $$4 }' | sort | tail -n 1
  uptodate-pkgtools:
  .if ${_PKGTOOLS_VER} < ${PKGTOOLS_REQD}
  	@case ${PKGNAME} in						\
--- 529,535 ----
  
  # Check that we're using up-to-date pkg_* tools with this file.
  .ifndef _PKGTOOLS_VER
! _PKGTOOLS_VER!= /usr/bin/ident ${PKG_CREATE} ${PKG_DELETE} ${PKG_INFO} ${PKG_ADD} | ${AWK} '$$1 ~ /\$$NetBSD/ && $$2 !~ /^crt0/ { gsub("/", "", $$4); print $$4 }' | sort | tail -n 1
  uptodate-pkgtools:
  .if ${_PKGTOOLS_VER} < ${PKGTOOLS_REQD}
  	@case ${PKGNAME} in						\
>Audit-Trail:
>Unformatted: