From owner-freebsd-current Sat May 25 13:48: 5 2002 Delivered-To: freebsd-current@freebsd.org Received: from freesbee.wheel.dk (freesbee.wheel.dk [193.162.159.97]) by hub.freebsd.org (Postfix) with ESMTP id 0996B37B400 for ; Sat, 25 May 2002 13:48:01 -0700 (PDT) Received: by freesbee.wheel.dk (Postfix, from userid 1002) id CF05738502; Sat, 25 May 2002 22:47:59 +0200 (CEST) Date: Sat, 25 May 2002 22:47:59 +0200 From: "Niels Chr. Bank-Pedersen" To: Peter Wemm Cc: Dag-Erling Smorgrav , current@FreeBSD.ORG Subject: Re: i386 tinderbox failure Message-ID: <20020525224759.D6884@bank-pedersen.dk> Mail-Followup-To: "Niels Chr. Bank-Pedersen" , Peter Wemm , Dag-Erling Smorgrav , current@FreeBSD.ORG References: <20020525192257.A48273807@overcee.wemm.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20020525192257.A48273807@overcee.wemm.org>; from peter@wemm.org on Sat, May 25, 2002 at 12:22:57PM -0700 X-PGP-Fingerprint: 18D0 73F3 767F 3A40 CEBA C595 4783 D7F5 5DD1 FB8C X-PGP-Public-Key: http://freesbee.wheel.dk/~ncbp/gpgkey.pub Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Sat, May 25, 2002 at 12:22:57PM -0700, Peter Wemm wrote: > Dag-Erling Smorgrav wrote: > > Peter Wemm writes: > > > Indeed it is installed. Note that you have exposed a fundamental bug > > > in the perl wrapper. It only searches $PATH, and /usr/local/bin is not > > > in $PATH for many system tools (eg: pkg_add -r). > > > > How about this: > > > > Index: perl.c > > =================================================================== > > RCS file: /home/ncvs/src/usr.bin/perl/perl.c,v > > retrieving revision 1.2 > > diff -u -u -r1.2 perl.c > > --- perl.c 18 May 2002 05:33:28 -0000 1.2 > > +++ perl.c 25 May 2002 12:52:43 -0000 > > @@ -59,5 +59,6 @@ > > if (errno != ENOENT) > > err(1, "%s", path); > > } > > + execve("/usr/local/bin/perl", argv, environ); > > errx(1, "Perl is not installed, try 'pkg_add -r perl'"); > > } > > > > Of course, it won't work if Perl was installed with a non-standard > > PREFIX. > > That would work, but IMHO this should be the first location we try since it > is the "most likely" location for it. > > Another idea. Suppose we have /etc/ports.conf or /etc/pkg.conf which is a > symlink to the base of the installed location of ports/packages? (like we > do with /etc/malloc.conf being a symlink). We could exec > /etc/ports.conf/bin/perl as a last resort too. It would look pretty freaky > but would be faster than parsing a text config file. pkg_add could do a > readlink("/etc/ports.conf") to set the default for pkg_add -p as > well. Why not make the link as "/etc/localbase" or somesuch - "*.conf" sort of implies that it is a file for editing (well, most files in /etc are, but anyway). Makes it a little less freaky to me. > -Peter /Niels Chr. -- Niels Christian Bank-Pedersen, NCB1-RIPE. "Hey, are any of you guys out there actually *using* RFC 2549?" To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message