Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S261980AbVEDCIP (ORCPT ); Tue, 3 May 2005 22:08:15 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S261983AbVEDCIP (ORCPT ); Tue, 3 May 2005 22:08:15 -0400 Received: from aibo.runbox.com ([193.71.199.94]:5281 "EHLO cujo.runbox.com") by vger.kernel.org with ESMTP id S261980AbVEDCII (ORCPT ); Tue, 3 May 2005 22:08:08 -0400 Message-ID: <42782F20.5080401@dwheeler.com> Date: Tue, 03 May 2005 22:10:40 -0400 From: "David A. Wheeler" Reply-To: dwheeler@dwheeler.com User-Agent: Mozilla Thunderbird 1.0.2-1.3.2 (X11/20050324) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Bill Davidsen CC: Valdis.Kletnieks@vt.edu, Andrea Arcangeli , Matt Mackall , Linus Torvalds , linux-kernel , git@vger.kernel.org Subject: Re: Mercurial 0.4b vs git patchbomb benchmark (/usr/bin/env again) References: <20050430025211.GP17379@opteron.random> <200505021614.j42GEufG008441@turing-police.cc.vt.edu> <4277B778.5020206@tmr.com> In-Reply-To: <4277B778.5020206@tmr.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1992 Lines: 41 Valdis.Kletnieks@vt.edu wrote: >> Most likely, his python lives elsewhere than /usr/bin, and the 'env' call >> results in causing a walk across $PATH to find it.... Bill Davidsen wrote: > Assuming that he has env in a standard place... I hope this isn't going > to start some rash of efforts to make packages run on non-standard > toolchains, which add requirements for one tool to get around > misplacement of another. The #!/usr/bin/env prefix is, in my opinion, a very good idea. There are a very few systems where env isn't in /usr/bin, but they were extremely rare years ago & are essentially extinct now. Basically, it's a 99% solution; getting the last 1% is really painful, but since getting the 99% is easy, let's do it and be happy. There are LOTS of systems where Python, bash, etc., do NOT live in whatever place you think of as "standard". I routinely use an OpenBSD 3.1 system; there is no /usr/bin/bash, but there _IS_ a /usr/local/bin/bash (in my PATH) and a /usr/bin/env. So this /usr/bin/env stuff REALLY is useful on a lot of systems, such as OpenBSD. It's critical to me, at least! This is actually really useful on ANY system, though. Even if some interpreter IS where you think it should be, that is NOT necessarily the interpreter you want to use. Using "/usr/bin/env" lets you use PATH to override things, so you don't HAVE to use the interpreter in some fixed location. That's REALLY handy for testing... I can download the whizbang Python 9.8.2, set it on the path, and see if everything works as expected. It's also nice if someone insists on never upgrading a package; you can install an interpreter "locally". Yes, you can patch all the files up, but resetting a PATH is _much_ easier. --- David A. Wheeler - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/