Subject: pkg/4337: pkgsrc doesn't work as well as it should.
To: None <gnats-bugs@gnats.netbsd.org>
From: None <cgd@NetBSD.ORG>
List: netbsd-bugs
Date: 10/24/1997 18:30:10
>Number:         4337
>Category:       pkg
>Synopsis:       pkgsrc doesn't work as well as it should.
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    gnats-admin (GNATS administrator)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Oct 24 11:35:00 1997
>Last-Modified:
>Originator:     Chris G. Demetriou
>Organization:
Kernel Hackers 'r' Us
>Release:        <NetBSD-current source date>
>Environment:
System: NetBSD brick.demetriou.com 1.3_ALPHA NetBSD 1.3_ALPHA (BRICK) #1: Wed Oct 22 23:26:01 PDT 1997     cgd@brick.demetriou.com:/usr/src/sys/arch/i386/compile/BRICK i386
(uesr-land current as of right now.)

>Description:
	pkgsrc doesn't work as well as it should, in a couple of ways:

	(1) it requires that PORTSDIR be set if the package source tree
	    is someplace other than /usr/pkgsrc.

	(2) it doesn't seem to detect missing-but-required executables
	    properly (in my case, gmake).

	The former is quite annoying, especially for people (like me) who
	might have multiple trees, and is quite gratuitous.  Other parts
	of the system, e.g. "src", don't require anything special to be
	set to build from nonstandard locations (as long as the whole tree
	is present, etc.).  There's not really a good reason why pkgsrc
	should be any different.

	The latter appears to be a bug.

>How-To-Repeat:
	Here's a typescript (run through sed -e s,<ctrl-m>,,).  You can
	probably just use the same commands I used to duplicate the problem.

	Note that my package source tree wasn't in /usr/pkgsrc (and shouldn't
	really have to be!), and that I don't have gmake installed anywhere
	on my system (though the gmake portion of the package source tree is
	present, though unbuilt).

Script started on Fri Oct 24 11:11:09 1997
You have mail.
1 [brick] xmascot % pwd
/a/users/cgd/netbsd-src/pkgsrc.virgin/x11/xmascot
2 [brick] xmascot % ls
CVS/         Makefile     distfiles/   files/       pkg/         typescript
3 [brick] xmascot % printenv
USER=cgd
CVS_RSH=ssh
SSH_AGENT_PID=164
HOME=/users/cgd
NNTPSERVER=localhost
OS_ARCH=i386
LOGNAME=cgd
OS_NAME=NetBSD
NAME=Chris G. Demetriou
TERM=xterm
PATH=/usr/bin:/usr/X11R6/bin:/usr/sbin:/sbin:/usr/local/bin:/users/cgd/bin:/emul/linux/usr/local/bin:/users/cgd/bin/i386.NetBSD:/users/cgd/bin:/usr/sbin:/sbin:/usr/games:/usr/bin:/bin:.
DISPLAY=brick.demetriou.com:0.0
XAUTHORITY=/users/cgd/.Xauthority
SHELL=/bin/csh
SSH_AUTHENTICATION_SOCKET=/tmp/ssh-cgd/agent-socket-144
PWD=/users/cgd/netbsd-src/pkgsrc.virgin/x11/xmascot
HOSTALIASES=/users/cgd/.hostaliases
TZ=US/Pacific
ORGANIZATION=Kernel Hackers 'r' Us
EDITOR=/usr/bin/vi
MAILDROP=/var/mail/cgd
WINDOWID=16777229
ftp_proxy=http://www-proxy.pa.dec.com:8080
http_proxy=http://www-proxy.pa.dec.com:8080
4 [brick] xmascot % make
mkdir: /usr/pkgsrc: Permission denied
*** Error code 1

Stop.
*** Error code 1

Stop.
*** Error code 1

Stop.
5 [brick] xmascot % pwd
/a/users/cgd/netbsd-src/pkgsrc.virgin/x11/xmascot
6 [brick] xmascot % setenv PORTSDIR /a/users/cgd/netbsd-src/pkgsrc.virgin
7 [brick] xmascot % make
>Fix:
	???  The package makefiles are one of the most evil bits of make code
	I've ever seen, and I didn't even try to dig into them.
>Audit-Trail:
>Unformatted:
>> Checksum OK for xmascot2.5p2.tar.gz.
===>  Extracting for xmascot-2.5p2
===>  xmascot-2.5p2 depends on executable: gmake - found
===>  Patching for xmascot-2.5p2
===>  Configuring for xmascot-2.5p2
imake -DUseInstalled -I/usr/X11R6/lib/X11/config
make Makefiles
making Makefiles in ./imagelib...
make includes
including in ././imagelib...
make depend
rm -f .depend
gccmakedep -f-  --   -I/usr/X11R6/include -I./imagelib -DCSRG_BASED  -DFUNCPROTO=15 -DNARROWPROTO  -DSHAPE -DXMASDIR=\"/usr/X11R6/lib/X11/xmascot\" -DSOUND	 -DBIFF -DBIFF_LIST -DMAILBOXDIR=\"/var/mail\"  -DUSE_DOUBLE	-DUSE_CHAINPAT -DSHADOW 	  -- main.c timer.c action.c menu.c sim.c resource.c pattern.c CascadeMenu.c SmeCascade.c alarm.c file.c preference.c sound.c biff.c > .depend
===>  Building for xmascot-2.5p2
env: gmake: No such file or directory
*** Error code 127

Stop.
*** Error code 1

Stop.
*** Error code 1

Stop.
8 [brick] xmascot % which gmake
gmake: Command not found.
9 [brick] xmascot % ls ../../*/gmake
CVS/      Makefile  files/    patches/  pkg/
10 [brick] xmascot % exit

Script done on Fri Oct 24 11:12:09 1997