Subject: pkg/15755: warning when strange file names present during pkg installation
To: None <gnats-bugs@gnats.netbsd.org>
From: None <simonb@wasabisystems.com>
List: netbsd-bugs
Date: 02/28/2002 10:50:46
>Number:         15755
>Category:       pkg
>Synopsis:       warning when strange file names present during pkg installation
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Feb 27 15:51:00 PST 2002
>Closed-Date:
>Last-Modified:
>Originator:     Simon Burge
>Release:        NetBSD 1.5.3_ALPHA
>Organization:
Wasabi Systems
>Environment:
System: NetBSD thoreau.thistledown.com.au 1.5.3_ALPHA NetBSD 1.5.3_ALPHA
(THOREAU) #43: Thu Jan 31 12:58:54 EST 2002
simonb@thoreau.thistledown.com.au:/usr/obj/sys/arch/alpha/compile/THOREAU alpha

>Description:
	If there's a file name that contains spaces in the pkg directory
	you'll get a warning along the lines of

		[: bar: unexpected operator

	during package installation.

	This starts around line 3480 of bsd.pkg.mk where there's

		for f in ${.CURDIR}/Makefile ${FILESDIR}/* ${PKGDIR}/*; do
			if [ -f $$f ]; then

	which isn't happy if any $f contains a space.  Simply double quoting
	the "$$f" results in problems further along.

>How-To-Repeat:
	Try

		cd /usr/pkgsrc/<cat>/<pkg>
		touch 'foo bar'
		make install

	and you'll see

		[: bar: unexpected operator

	just before the "===> Registering installation for ..." line
>Fix:
	Non given.
>Release-Note:
>Audit-Trail:
>Unformatted: