From owner-freebsd-ports-bugs@FreeBSD.ORG Thu Aug 25 09:10:22 2005 Return-Path: X-Original-To: freebsd-ports-bugs@hub.freebsd.org Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7DE9716A41F for ; Thu, 25 Aug 2005 09:10:22 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id C783843D46 for ; Thu, 25 Aug 2005 09:10:21 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.3/8.13.3) with ESMTP id j7P9ALML063234 for ; Thu, 25 Aug 2005 09:10:21 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.3/8.13.1/Submit) id j7P9ALmI063233; Thu, 25 Aug 2005 09:10:21 GMT (envelope-from gnats) Resent-Date: Thu, 25 Aug 2005 09:10:21 GMT Resent-Message-Id: <200508250910.j7P9ALmI063233@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, vd@datamax.bg Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8316E16A43D; Thu, 25 Aug 2005 09:05:20 +0000 (GMT) (envelope-from vd@datamax.bg) Received: from jengal.datamax.bg (jengal.datamax.bg [82.103.104.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1F5D843D46; Thu, 25 Aug 2005 09:05:19 +0000 (GMT) (envelope-from vd@datamax.bg) Received: from sinanica.bg.datamax (sinanica.bg.datamax [192.168.10.1]) by jengal.datamax.bg (Postfix) with QMQP id 4A45E87CD; Thu, 25 Aug 2005 12:05:18 +0300 (EEST) Received: (nullmailer pid 64696 invoked by uid 1004); Thu, 25 Aug 2005 09:05:18 -0000 Message-Id: <20050825090518.GA64616@sinanica.bg.datamax> Date: Thu, 25 Aug 2005 12:05:18 +0300 From: Vasil Dimov To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: marko@FreeBSD.org Subject: ports/85281: Tools/scripts/portsearch: fix default INDEX filename X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: vd@datamax.bg List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Aug 2005 09:10:22 -0000 >Number: 85281 >Category: ports >Synopsis: Tools/scripts/portsearch: fix default INDEX filename >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Thu Aug 25 09:10:21 GMT 2005 >Closed-Date: >Last-Modified: >Originator: Vasil Dimov >Release: FreeBSD 5.4-STABLE i386 >Organization: DataMax >Environment: >Description: Tools/scripts/portsearch by default looks for /usr/ports/INDEX for the INDEX file, which is not the right assumption for 5.x and above. >How-To-Repeat: /usr/ports$ ./Tools/scripts/portsearch -n foo Unable to open /usr/ports/INDEX at ./Tools/scripts/portsearch line 128. /usr/ports$ >Fix: --- portsearch.diff begins here --- Index: portsearch =================================================================== RCS file: /home/ncvs/ports/Tools/scripts/portsearch,v retrieving revision 1.3 diff -u -r1.3 portsearch --- portsearch 9 Jan 2005 10:21:17 -0000 1.3 +++ portsearch 25 Aug 2005 08:33:18 -0000 @@ -43,9 +43,12 @@ # Global variables # +my $osrel = `/usr/bin/uname -r`; +$osrel =~ s/\..+$//s; + my $VERSION = "1.0"; -my $file = "/usr/ports/INDEX"; -my $match = 1; +my $file = "/usr/ports/INDEX" . ($osrel <= 4 ? "" : "-$osrel"); +my $match = 1; my $count = 0; # We only need 7 of the 10 fields in a record; define which ones in a --- portsearch.diff ends here --- >Release-Note: >Audit-Trail: >Unformatted: