Subject: pkg/18673: Update to pkg/18672 to support mtree(8) too
To: None <gnats-bugs@gnats.netbsd.org>
From: None <sketch@rd.bbc.co.uk>
List: netbsd-bugs
Date: 10/16/2002 10:06:25
>Number:         18673
>Category:       pkg
>Synopsis:       Update to pkg/18672 to support mtree(8) too
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Oct 16 10:07:01 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator:     Jonathan Perkin
>Release:        N/A
>Organization:
British Broadcast Corporation
>Environment:
SunOS desk06 5.9 Generic_112233-01 sun4u sparc SUNW,Ultra-5_10
>Description:
In addition to pkg/18672 which supports pkg_* on bootstrap-pkgsrc, the
below patch makes mtree (kinda) work too.

I say "kinda" because the version of mtree in bootstrap-pkgsrc is too
old to grok /set commands as far as I can see, producing:

+ /cache/npkg/sbin/mtree -U -f /cache/pkgsrc/mk/SunOS.pkg.dist -d -e -p /cache/npkg/ 
unknown keyword `/set'<unset_progname>: failed at line 5 of the specification
*** Error code 1

I haven't verified this though, just presuming that it's out of date
as pkg_* are too.
>How-To-Repeat:

>Fix:
The below diff includes pkg/18672

Index: defs.SunOS.mk
===================================================================
RCS file: /cache/ncvs/pkgsrc/mk/defs.SunOS.mk,v
retrieving revision 1.30
diff -u -r1.30 defs.SunOS.mk
--- defs.SunOS.mk       2002/10/06 22:16:41     1.30
+++ defs.SunOS.mk       2002/10/16 16:55:35
@@ -40,7 +40,11 @@
 LN?=           /usr/bin/ln
 LS?=           /usr/bin/ls
 MKDIR?=                /usr/bin/mkdir -p
+.if exists(${ZOULARISBASE}/bin/mtree)
 MTREE?=                ${ZOULARISBASE}/bin/mtree
+.else
+MTREE?=                ${ZOULARISBASE}/sbin/mtree
+.endif
 MV?=           /usr/bin/mv
 .if exists(/usr/bin/gpatch)
 PATCH?=                /usr/bin/gpatch -b
@@ -120,7 +124,11 @@
 ZOULARISBASE:=         ${LOCALBASE}
 .  endif
 .endif
+.if exists(${ZOULARISBASE}/bin/pkg_info)
 PKG_TOOLS_BIN?=                ${ZOULARISBASE}/bin
+.else
+PKG_TOOLS_BIN?=                ${ZOULARISBASE}/sbin
+.endif
 
 .if ${X11BASE} == "/usr/openwin"
 HAVE_OPENWINDOWS=      YES
>Release-Note:
>Audit-Trail:
>Unformatted: