From sjr@home.net  Sat Sep  5 06:01:17 1998
Received: from istari.home.net (cc158233-a.catv1.md.home.com [24.3.25.17])
          by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id GAA22501
          for <FreeBSD-gnats-submit@freebsd.org>; Sat, 5 Sep 1998 06:01:16 -0700 (PDT)
          (envelope-from sjr@home.net)
Received: (from sjr@localhost)
	by istari.home.net (8.8.8/8.8.6) id JAA09148;
	Sat, 5 Sep 1998 09:00:06 -0400 (EDT)
Message-Id: <199809051300.JAA09148@istari.home.net>
Date: Sat, 5 Sep 1998 09:00:06 -0400 (EDT)
From: sjr@home.net
Reply-To: sjr@home.net
To: FreeBSD-gnats-submit@freebsd.org
Subject: whereis doesn't find sources in /usr/src/contrib
X-Send-Pr-Version: 3.2

>Number:         7835
>Category:       bin
>Synopsis:       whereis doesn't find sources in /usr/src/contrib
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat Sep  5 06:10:00 PDT 1998
>Closed-Date:    Sun Oct 4 03:29:51 PDT 1998
>Last-Modified:  Sun Oct  4 03:57:13 PDT 1998
>Originator:     Stephen J. Roznowski
>Release:        FreeBSD 3.0-CURRENT i386
>Organization:
>Environment:

	$Id: whereis.pl,v 1.5 1997/12/22 19:11:28 ache Exp $

>Description:

	whereis doesn't search /usr/src/contrib, and stops at
	first match.

>How-To-Repeat:

	% whereis libpcap
	  libpcap:

	% whereis cvs
	  cvs: /usr/bin/cvs /usr/share/man/man1/cvs.1.gz \
	       /usr/src/gnu/usr.bin/cvs

	  After patch.

	% whereis libpcap
	  libpcap: /usr/src/contrib/libpcap

	% whereis cvs
	  cvs: /usr/bin/cvs /usr/share/man/man1/cvs.1.gz \
	       /usr/src/gnu/usr.bin/cvs /usr/src/contrib/cvs

>Fix:
	
--- usr.bin/whereis.pl	Wed Dec 24 09:15:13 1997
+++ usr.bin/whereis.pl.new	Sat Sep  5 08:53:27 1998
@@ -144,7 +144,7 @@
 		"/usr/src/usr.sbin", "/usr/src/libexec",
 		"/usr/src/gnu/bin", "/usr/src/gnu/usr.bin",
 		"/usr/src/gnu/sbin", "/usr/src/gnu/usr.sbin",
-		"/usr/src/gnu/libexec");
+		"/usr/src/gnu/libexec", "/usr/src/contrib");
 
     #
     # if /usr/ports exists, look in all its subdirs, too
@@ -213,7 +213,7 @@
 	$found = 0;
 	$unusual++;
 	foreach (@sources) {
-	    $line .= " $_/$name", $unusual--, $found++, last if -d "$_/$name";
+	    $line .= " $_/$name", $unusual--, $found++ if -d "$_/$name";
 	}
 	#
 	# If not yet found, ask locate(1) to do the search for us.
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: obrien 
State-Changed-When: Sun Oct 4 03:29:51 PDT 1998 
State-Changed-Why:  
commited. 
>Unformatted:
