Subject: pkg/5184: bsd.port.mk shouldn't look in $PATH for depends binaries
To: None <gnats-bugs@gnats.netbsd.org>
From: None <nathanw@MIT.EDU>
List: netbsd-bugs
Date: 03/22/1998 18:15:04
>Number:         5184
>Category:       pkg
>Synopsis:       bsd.port.mk can find programs a package depends on in PATH
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    gnats-admin (GNATS administrator)
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Sun Mar 22 15:20:00 1998
>Last-Modified:
>Originator:     Nathan J. Williams
>Organization:
	Massachvsetts Institvte of Technology
	
>Release:        NetBSD-current as of 1998-3-21
>Environment:
	
System: NetBSD road-runner.mit.edu 1.3E NetBSD 1.3E (ROAD-RUNNER) #94: Mon Mar 16 11:12:37 EST 1998 nathanw@road-runner.mit.edu:/usr/src/sys/arch/i386/compile/ROAD-RUNNER i386


>Description:
	The code to find {FETCH,BUILD,RUN}_DEPENDS programs in bsd.port.mk 
(lines 1697 through 1756) will try to find a program in a directory given in 
$PATH if the name of the dependancy doesn't start with /. While this is 
documented with the explanation of those variables, it is somewhat broken. 
The documentation for the variables says that these variables describe other 
ports ("packages") that the current package can depend on. It is a mistake
to assume that any binary in $PATH comes from the package system. For example,
on my system any package that defines USE_PERL5=yes will look for perl5.00404, 
and it will find /usr/athena/bin/perl5.00404 - which does not come from the
package system. 
	There are some general problems here. Either the *_DEPENDS variables 
need to be allowed to refer to non-package-system binaries, and packages (such 
as converters/p5-MIME-Base64) that run programs like '${PREFIX}/bin/perl' need
to be adjusted to simpy run 'perl'; or bsd.port.mk needs to be adjusted to 
stop looking for programs in $PATH, and instead look in ${PREFIX}. 

>How-To-Repeat:
	Try to build a package that defines USE_PERL5=yes on a system with 
an independent perl5 installation. Try to understand what's breaking.
>Fix:
	Unclear. See "Description".
>Audit-Trail:
>Unformatted: