public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: "Helmut Karlowski" <helmut.karlowski@ish.de>
To: cygwin@cygwin.com
Subject: Re: /etc/profile: avoid multiple /usr/bin in PATH
Date: Tue, 08 Dec 2015 21:17:00 -0000	[thread overview]
Message-ID: <op.x9cf2njrofd6j1@frascati.upc.de> (raw)
In-Reply-To: <87oae0venj.fsf@Rainer.invalid>

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

  reply	other threads:[~2015-12-08 21:17 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-06 22:47 Helmut Karlowski
2015-12-08 21:01 ` Achim Gratz
2015-12-08 21:17   ` Helmut Karlowski [this message]
2015-12-08 21:21     ` Achim Gratz
2015-12-08 21:26       ` Helmut Karlowski
2015-12-08 21:31         ` Helmut Karlowski
2015-12-08 21:59           ` Helmut Karlowski
2016-09-04 11:32 ` Achim Gratz
2016-09-05  4:08   ` Doug Henderson
2016-09-05 17:57     ` Achim Gratz
2016-09-05 18:13       ` Vince Rice
2016-09-05 19:07         ` Achim Gratz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=op.x9cf2njrofd6j1@frascati.upc.de \
    --to=helmut.karlowski@ish.de \
    --cc=cygwin@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).