From owner-freebsd-ports@FreeBSD.ORG Mon Sep 22 19:16:37 2008 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 428D01065670 for ; Mon, 22 Sep 2008 19:16:37 +0000 (UTC) (envelope-from mezz7@cox.net) Received: from eastrmmtao102.cox.net (eastrmmtao102.cox.net [68.230.240.8]) by mx1.freebsd.org (Postfix) with ESMTP id E48A58FC1F for ; Mon, 22 Sep 2008 19:16:36 +0000 (UTC) (envelope-from mezz7@cox.net) Received: from eastrmimpo01.cox.net ([68.1.16.119]) by eastrmmtao102.cox.net (InterMail vM.7.08.02.01 201-2186-121-102-20070209) with ESMTP id <20080922191637.OHPP22786.eastrmmtao102.cox.net@eastrmimpo01.cox.net>; Mon, 22 Sep 2008 15:16:37 -0400 Received: from mezz.mezzweb.com ([68.103.35.214]) by eastrmimpo01.cox.net with bizsmtp id HvGb1a00N4dCcn002vGcf5; Mon, 22 Sep 2008 15:16:36 -0400 X-Authority-Analysis: v=1.0 c=1 a=IfE04opV_tAA:10 a=2LZbf7JphJMA:10 a=6I5d2MoRAAAA:8 a=wP8gUfXatZ7CHyLKLtMA:9 a=EpYonoJ8TZ1fOEJVYkMq8WqE59sA:4 a=4vB-4DCPJfMA:10 a=SV7veod9ZcQA:10 a=LY0hPdMaydYA:10 X-CM-Score: 0.00 Date: Mon, 22 Sep 2008 14:16:35 -0500 To: "Alexey Shuvaev" From: "Jeremy Messenger" Content-Type: text/plain; format=flowed; delsp=yes; charset=utf-8 MIME-Version: 1.0 References: <20080922175249.GA43367@wep4035.physik.uni-wuerzburg.de> Content-Transfer-Encoding: 7bit Message-ID: In-Reply-To: <20080922175249.GA43367@wep4035.physik.uni-wuerzburg.de> User-Agent: Opera Mail/9.52 (Linux) Cc: freebsd-ports@freebsd.org Subject: Re: x11-wm/fluxbox fluxbox-generate_menu lists all available programs. X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Sep 2008 19:16:37 -0000 On Mon, 22 Sep 2008 12:52:49 -0500, Alexey Shuvaev wrote: > Hello! > > The script fluxbox-generate_menu shipped with current versions of > fluxbox (fluxbox-1.1.0.1_1 and 1.1.1 too, I think) produces > menu with all known programs. The reason for it is find_it* family > of functions used to determine if the program exists (see attached > test.sh). > It expects that 'hash' will return non-zero exit code when it cannot find > the command and it is true on linix (some Ubuntu with 'dash', > surprisingly > enough, man says it is BSD sh), but not here: > > ~> uname -a > FreeBSD wep4035.physik.uni-wuerzburg.de 8.0-CURRENT FreeBSD 8.0-CURRENT > #0: Sun Sep 21 18:51:53 CEST 2008 > root@wep4035.physik.uni-wuerzburg.de:/usr/obj/usr/src/sys/GENERIC amd64 > > ~> ./test.sh ls > Found ls > > ~> ./test.sh bla-bla-non-existent > Found bla-bla-non-existent > > Substituting 'hash' with 'which' solves the problem more or less, > but I am not a sh guru to claim it is 100% correct. I agree for 'which' is best thing to do. Not all shells (csh, see in builtin(1)) have 'hash' stuff. I have bring all of hash -> which stuff from 1.0.0, so let me know patches work for you. http://people.freebsd.org/~mezz/diff/patch-util%3a%3afluxbox-generate_menu.in http://people.freebsd.org/~mezz/diff/patch-util_fbsetbg Put those files in x11-wm/fluxbox/files/ and reinstall fluxbox. > It could be also a sh(1) bug... No idea, I get same result with zsh. Cheers, Mezz > Alexey. -- mezz7@cox.net - mezz@FreeBSD.org FreeBSD GNOME Team http://www.FreeBSD.org/gnome/ - gnome@FreeBSD.org