public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* Re: /etc/profile - futile try to predict order of execution
@ 2003-09-19 21:32 Igor Pechtchanski
  2003-09-19 23:56 ` Hannu E K Nevalainen (garbage mail)
  0 siblings, 1 reply; 4+ messages in thread
From: Igor Pechtchanski @ 2003-09-19 21:32 UTC (permalink / raw)
  To: Hannu E K Nevalainen (garbage mail); +Cc: cygwin

On Fri, 19 Sep 2003, Hannu E K Nevalainen (garbage mail) wrote:

> While looking for the reason why "less" has stopped understanding the
> BACKSPACE key (and a bunch of others) I stumbled over the following.
>
> I'm sending this just to INFORM about it.
> I'm NOT on the xfree list.
> I'm NOT interested of participating in more discussions on this subject.
>
> > $ head -63 /etc/profile | tail -1
> >         `/bin/find /etc/profile.d -iname '*.sh' -type f`
> >
> > $ /bin/find /etc/profile.d -iname '*.sh' -type f
> > /etc/profile.d/lilypond-profile.sh
> > /etc/profile.d/mc.sh
> > /etc/profile.d/openssl.sh
> > /etc/profile.d/00xfree.sh
>
>  NOTE that 00xfree is listed last...
>  THEN read what the comment in the first lines of the script says.
>
> > $ cat /etc/profile.d/00xfree.sh
> > # the script name starts with 00 to ensure that it is executed before any
> > # other scripts because one of them may need to know where X is to run
> > # properly.
> >
> > X11PATH="/usr/X11R6/bin"
> >
> > if ! /bin/echo ${PATH} | /bin/grep -q ${X11PATH} ; then
> >     export PATH="${PATH}:${X11PATH}"
> > fi
> >
> > $

IMO, this belongs on the cygwin list, as this concerns the predictability
of the script execution order from /etc/profile.

Hannu, this is really weird.  I'm getting 00xfree.sh as the *first* file
match:

$ /bin/find /etc/profile.d/ -iname '*.sh' -type f
/etc/profile.d/00xfree.sh
/etc/profile.d/mc.sh
/etc/profile.d/openssl.sh
$

WAGs:

Could this be the result of a different collation sequence in your
language?  Can you try running "LC_ALL=C /bin/find /etc/profile.d -iname
'*.sh' -type f" on your machine?

Speaking of your machine, could this be because you're using Win98?
(Checking) Bingo!  Somehow, on Win98 find traverses files in unsorted
order, i.e., the order they were created.  I guess either /etc/profile
should guarantee alphanumeric order, or maintainers need to reassess their
assumptions.
        Igor
-- 
                                http://cs.nyu.edu/~pechtcha/
      |\      _,,,---,,_                pechtcha@cs.nyu.edu
ZZZzz /,`.-'`'    -.  ;-;;,_            igor@watson.ibm.com
     |,4-  ) )-,_. ,\ (  `'-'           Igor Pechtchanski, Ph.D.
    '---''(_/--'  `-'\_) fL     a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

"I have since come to realize that being between your mentor and his route
to the bathroom is a major career booster."  -- Patrick Naughton

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 4+ messages in thread

* RE: /etc/profile - futile try to predict order of execution
  2003-09-19 21:32 /etc/profile - futile try to predict order of execution Igor Pechtchanski
@ 2003-09-19 23:56 ` Hannu E K Nevalainen (garbage mail)
  2003-09-20  0:01   ` Christopher Faylor
  2003-09-21 21:29   ` [update] base-files (was: RE: /etc/profile - futile try to predict order of execution) John Morrison
  0 siblings, 2 replies; 4+ messages in thread
From: Hannu E K Nevalainen (garbage mail) @ 2003-09-19 23:56 UTC (permalink / raw)
  To: cygwin

> From: Igor Pechtchanski

Please, Igor - I got FOUR COPIES of this... <SIGH> - just one of them ended
up in the cygwin ML folder.


> On Fri, 19 Sep 2003, Hannu E K Nevalainen (garbage mail) wrote:
>
> > While looking for the reason why "less" has stopped understanding the
> > BACKSPACE key (and a bunch of others) I stumbled over the following.

As this was my main objective... I'm truly off on a side-subject now.

 Anyone have any ideas here?  I THINK it started when I replace /etc/profile
with one that had a better solution around line 63 (see below)


> > I'm sending this just to INFORM about it.
> > I'm NOT on the xfree list.
> > I'm NOT interested of participating in more discussions on this subject.
> >
> > > $ head -63 /etc/profile | tail -1
> > >         `/bin/find /etc/profile.d -iname '*.sh' -type f`
> > >
> > > $ /bin/find /etc/profile.d -iname '*.sh' -type f
> > > /etc/profile.d/lilypond-profile.sh
> > > /etc/profile.d/mc.sh
> > > /etc/profile.d/openssl.sh
> > > /etc/profile.d/00xfree.sh
> >
> >  NOTE that 00xfree is listed last...
> >  THEN read what the comment in the first lines of the script says.
> >
> > > $ cat /etc/profile.d/00xfree.sh
> > > # the script name starts with 00 to ensure that it is
> executed before any
> > > # other scripts because one of them may need to know where X is to run
> > > # properly.
> > >
> > > X11PATH="/usr/X11R6/bin"
> > >
> > > if ! /bin/echo ${PATH} | /bin/grep -q ${X11PATH} ; then
> > >     export PATH="${PATH}:${X11PATH}"
> > > fi
> > >
> > > $
>
> IMO, this belongs on the cygwin list, as this concerns the predictability
> of the script execution order from /etc/profile.


 GAH! 8-/  I'll grow gray hairs RSN (NOTE: I'm BALD!)


> Hannu, this is really weird.  I'm getting 00xfree.sh as the *first* file
> match:
>
> $ /bin/find /etc/profile.d/ -iname '*.sh' -type f
> /etc/profile.d/00xfree.sh
> /etc/profile.d/mc.sh
> /etc/profile.d/openssl.sh
> $
>
> WAGs:
>
> Could this be the result of a different collation sequence in your
> language?  Can you try running "LC_ALL=C /bin/find /etc/profile.d -iname
> '*.sh' -type f" on your machine?

$ LC_ALL=C /bin/find /etc/profile.d -iname '*.sh' -type f
/etc/profile.d/lilypond-profile.sh
/etc/profile.d/mc.sh
/etc/profile.d/openssl.sh
/etc/profile.d/00xfree.sh

$ uname -a
CYGWIN_NT-5.0 P450 1.5.4s(0.94/3/2) 20030910 22:57:36 i686 unknown unknown
Cygwin


> Speaking of your machine, could this be because you're using Win98?
> (Checking) Bingo!  Somehow, on Win98 find traverses files in unsorted
> order, i.e., the order they were created.

 Hrm... It might be more relevant to FAT32 I believe...
I'm more and more running just "W2K Advaced Server" (as if it were a
workstation mostly), but cygwin still _resides_ on C: which is a FAT32
partition with my Win98SE still installed.
 It gets updated from W2K too... I have THE SAME installation running from
within W98SE due to ~/.profile and ~/.bash_logout saving/restoring mounts
to/from a fine in the cygwin root (/).

>  I guess either /etc/profile
> should guarantee alphanumeric order, or maintainers need to reassess their
> assumptions.
>         Igor

UNTESTED:

$ diff -up profile.orig profile
--- profile.orig        2003-09-19 23:50:18.000000000 +0200
+++ profile     2003-09-19 23:49:56.000000000 +0200
@@ -60,7 +60,7 @@ if [ -d "/etc/profile.d" ]; then
                        . "$f"
                fi
        done <<- EOF
-       `/bin/find /etc/profile.d -iname '*.sh' -type f`
+       `/bin/find /etc/profile.d -iname '*.sh' -type f | sort`
        EOF
 fi



/Hannu E K Nevalainen, B.Sc. EE - 59?16.37'N, 17?12.60'E
-- UTC+01, DST -> UTC+02  --
--END OF MESSAGE--


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: /etc/profile - futile try to predict order of execution
  2003-09-19 23:56 ` Hannu E K Nevalainen (garbage mail)
@ 2003-09-20  0:01   ` Christopher Faylor
  2003-09-21 21:29   ` [update] base-files (was: RE: /etc/profile - futile try to predict order of execution) John Morrison
  1 sibling, 0 replies; 4+ messages in thread
From: Christopher Faylor @ 2003-09-20  0:01 UTC (permalink / raw)
  To: cygwin

On Sat, Sep 20, 2003 at 12:14:37AM +0200, Hannu E K Nevalainen (garbage mail) wrote:
>> From: Igor Pechtchanski
>
>Please, Igor - I got FOUR COPIES of this... <SIGH> - just one of them ended
>up in the cygwin ML folder.

He was trying to bypass the subject blocker.  Several keywords are
blocked here regardless of membership in cygwin or cygwin-xfree or the
global allow list.  XFree86 is one of them.  Hopefully the reasoning is
obvious.

cgf

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [update] base-files (was: RE: /etc/profile - futile try to predict order of execution)
  2003-09-19 23:56 ` Hannu E K Nevalainen (garbage mail)
  2003-09-20  0:01   ` Christopher Faylor
@ 2003-09-21 21:29   ` John Morrison
  1 sibling, 0 replies; 4+ messages in thread
From: John Morrison @ 2003-09-21 21:29 UTC (permalink / raw)
  To: cygwin

> Subject: RE: /etc/profile - futile try to predict order of execution

AFAIK /etc/profile *never* tried to predict/guarentee order of
execution.  If packages made an assumption, well you know the
saying.

> -       `/bin/find /etc/profile.d -iname '*.sh' -type f`
> +       `/bin/find /etc/profile.d -iname '*.sh' -type f | sort`

Fixed.

Please upload 2.6-1

J.

<http://homepage.ntlworld.com/j-n-s.morrison/john/cygwin/base-files/md5sum>

426b60728ae5061ab9e8e20212ef6fc6
<http://homepage.ntlworld.com/j-n-s.morrison/john/cygwin/base-files/base-fil
es-2.6-1.tar.bz2>

9b2695ab19b83cc2eb27e346801a114c
<http://homepage.ntlworld.com/j-n-s.morrison/john/cygwin/base-files/setup.hi
nt>


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2003-09-21 21:26 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-09-19 21:32 /etc/profile - futile try to predict order of execution Igor Pechtchanski
2003-09-19 23:56 ` Hannu E K Nevalainen (garbage mail)
2003-09-20  0:01   ` Christopher Faylor
2003-09-21 21:29   ` [update] base-files (was: RE: /etc/profile - futile try to predict order of execution) John Morrison

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).