Subject: pkg/15385: sqsh install breaks trying to install man pages
To: None <gnats-bugs@gnats.netbsd.org>
From: James K. Lowden <jklowden@schemamania.org>
List: netbsd-bugs
Date: 01/26/2002 16:56:41
>Number:         15385
>Category:       pkg
>Synopsis:       sqsh install breaks trying to install man pages
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Jan 26 13:57:00 PST 2002
>Closed-Date:
>Last-Modified:
>Originator:     James K. Lowden
>Release:        1.4.2
>Organization:
>Environment:
i386
System: NetBSD home.schemamania.org 1.4.2 NetBSD 1.4.2 (GENERIC) #3: Wed Mar 15 23:41:54 PST 2000 toddpw@vader.toddpw.net:/usr/src/sys/arch/i386/compile/GENERIC i386


>Description:
On "make install", the man pages are installed by a script:

	/usr/pkgsrc/databases/sqsh/work/sqsh-1.7/autoconf/install-man
	
The script includes a line (I think this is the one):

	while ( test $# -ne 0 -a "$1" != "--" ); do

that fails to parse (see below) under the Bourne shell.  

I'm going to guess that autoconf generates this script and that it's been mostly
tested with bash's "sh" emulation.  The behavior of which may be subtly from
the (ahem) real /bin/sh.  
	
>How-To-Repeat:
Having done "make":
# pwd
/usr/pkgsrc/databases/sqsh
g# make install
===> Installing for sqsh-1.7
cc -L/usr/pkgsrc/databases/sqsh/work/.buildlink/lib  [etc.]
./autoconf/install-sh -d /usr/pkg/bin
./autoconf/install-sh sqsh /usr/pkg/bin/sqsh
./autoconf/install-man -s ./doc -d /usr/pkg/man sqsh.1
test: --: unknown operand
Installing ./doc as /usr/local/man/man1/.1
cp: ././doc is a directory (not copied).
install.man: No such man page ./-d
*** Error code 1

>Fix:
Workaround.  I replaced Line 1:
	#!/bin/sh
with
	#!/usr/pkg/bin/bash
	
That did the trick.

>Release-Note:
>Audit-Trail:
>Unformatted: