From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 64303 invoked by alias); 8 Dec 2015 21:17:09 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 64285 invoked by uid 89); 8 Dec 2015 21:17:08 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=0.5 required=5.0 tests=AWL,BAYES_50,RCVD_IN_DNSWL_NONE,SPF_PASS,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: mailout.ish.de Received: from mailout.ish.de (HELO mailout.ish.de) (80.69.98.253) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Tue, 08 Dec 2015 21:17:06 +0000 Received: from submit.unitybox.de (mailout.ish.de [80.69.98.253]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mailout.ish.de (Postfix) with ESMTPS id 3pFZ6K5WSyz7ZKKH for ; Tue, 8 Dec 2015 22:15:21 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by submit.unitybox.de (Postfix) with ESMTP id 3pFZ8H0TKNz6dtBv for ; Tue, 8 Dec 2015 22:17:03 +0100 (CET) Received: from submit.unitybox.de ([127.0.0.1]) by localhost (submit.unitybox.de [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id 08-qflYWidxp for ; Tue, 8 Dec 2015 22:17:03 +0100 (CET) X-Abuse-ID: hremUFXL0y-8240@umkbw.customer Received: from frascati.upc.de (unknown [5.147.52.203]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by submit.unitybox.de (Postfix) with ESMTPSA id 3pFZ8G67PLz6dtBc for ; Tue, 8 Dec 2015 22:17:02 +0100 (CET) Content-Type: text/plain; charset=iso-8859-15; format=flowed; delsp=yes To: cygwin@cygwin.com Subject: Re: /etc/profile: avoid multiple /usr/bin in PATH References: <87oae0venj.fsf@Rainer.invalid> Date: Tue, 08 Dec 2015 21:17:00 -0000 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: "Helmut Karlowski" Message-ID: In-Reply-To: <87oae0venj.fsf@Rainer.invalid> User-Agent: Opera Mail/12.17 (Win32) Outgoingd: 0.4.0_m1 X-IsSubscribed: yes X-SW-Source: 2015-12/txt/msg00108.txt.bz2 Am 08.12.2015, 22:01 Uhr, schrieb Achim Gratz: > Helmut Karlowski writes: >> I set C:/cygwin/usr/bin in my windows-environment. Now /etc/profile >> always adds /usr/bin to PATH resulting in /usr/bin being twice in my >> cygwin-PATH. >> >> The attached patch fixes this. > > I tend to reject this patch. The purpose of the default profile is to > put those two paths in front, while with your patch they could end up > anywhere. If you think that's OK for you, then you can already do that, Not if they have not been present in the windows-path before. I personally want to keep the order I have in my windows-path, but tastes may differ. But the actual reason for me to change profile was that I had /usr/bin twice in my cygwin-path. That can be avoided with the original profile if the user also sets CYGWIN_NOWINPATH to something in the windows-environment, which I escaped me before, and then I would also have to set /usr/local/bin in windows. I find this overcomplicated for the user. To force /usr/bin first in PATH would be doable of course. > but I don't think that's a good default. > >> It also sets SHELL if not yet set and avoids a call of hostname. > > Can you tell me in which circumstances this happens and why this is a > problem? SHELL is supposed to be the user preference, so I don't think > /etc/profile should try to second-guess it. /etc/profile is run before ~/.profile, and if that does not set SHELL there will be none. -Helmut -- -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple