Re: gbs cleanup patch, 2nd try

2004-10-30 Thread Andrew Schulman
 Great.  Have you tested whether the -e flag gets propagated inside the
 functions?
 
 Yes, I have now:
 
 $ /bin/sh -e ; echo finished /bin/sh -e, status=$?
 $ echo $-
 eims
 $ # the -e flag propagates into subshells:
 $ tst1() { echo $- ; }
 $ tst1
 eims
 $ # false result inside a function causes subshell and
 $ # main shell to immediately exit:
 $ tst2() { false ; echo continuing execution ; }
 $ tst2
 finished /bin/sh -e, status=1

Sorry, the above is wrong:

$ /bin/sh -e ; echo finished /bin/sh -e, status=$?
$ ( echo $- )
ehimBH
$ ( false ; echo continuing execution )
$ echo $?
1

So -e is effective in the subshell, but when it returns its false status it 
doesn't cause its parent shell to exit.  I now see in the manual that this is 
because a subshell isn't a simple command.

So I will have to rethink how best to handle a false return status of a 
subshell.


tetex 2.99.1.20041026 prerelease

2004-10-30 Thread Jan Nieuwenhuizen

teTeX 2.99.1 can be considered something of a release candidate.
I've made considerable efforts to make teTeX 3.0 [cross] build out of
the box for Cygwin, many thanks to Thomas Esser and Olaf Weber.

This release has major changes since 2.0.2, so I do not think
it's wise to put this in the test distribution yet.

You may give it some testing by pointing setup to

http://lilypond.org/cygwin/

or just download it from there.

There's a known issue with texconfig that needs the xdvi/XDvi app
configuration file, that's duplicated in tetex-bin for now, but
texconfig is planned to get a rewrite before 3.0.

Please report any non-Cygwin problems with this release to the
tetex-pretest list.

Enjoy,
Jan.

-- 
Jan Nieuwenhuizen [EMAIL PROTECTED] | GNU LilyPond - The music typesetter
http://www.xs4all.nl/~jantien   | http://www.lilypond.org


Re: ATTN: basefiles, tcsh, zsh maintainers; chere updates to login scripts

2004-10-30 Thread John Morrison
 On Fri, Oct 29, 2004 at 11:11:17AM -0700, Dave wrote:
The logic required is:
If the environment variable CHERE_INVOKING is present, do not change to
 the users home directory.

http://homepage.ntlworld.com/j-n-s.morrison/john/cygwin/base-files/base-files-3.1-2.tar.bz2
http://homepage.ntlworld.com/j-n-s.morrison/john/cygwin/base-files/md5sum
http://homepage.ntlworld.com/j-n-s.morrison/john/cygwin/base-files/setup.hint

These were done in a hurry (am leaving for holiday in 15 mins!) somebody
please check!!!

If it's wrong I'm sure cfg or somebody could fix and send me the changes
to incorporate for the next version.

setup.hint hasn't changed:
sdesc: A set of important system configuration and setup files
ldesc: A set of important system configuration and setup files
requires: ash fileutils sh-utils textutils findutils sed
category: base

md5sum
71534439bf742f261d0a749fd6186463 *base-files-3.1-2.tar.bz2
9b2695ab19b83cc2eb27e346801a114c *setup.hint

Change log:
3.1-2
* Fix for zsh/ksh - Tero Niemela
* Change cd $HOME functionality for CHERE - Dave

J.

PS Dave, I'm sorry I couldn't find your surname anywhere!



Re: gbs cleanup patch, 2nd try

2004-10-30 Thread Andrew Schulman
 Sorry, the above is wrong:

Sorry again, but please disregard my previous message.  I was confused 
because I was testing some features of /bin/sh -e on Debian.  On Debian 
/bin/sh invokes bash, while on Cygwin it runs ash.  It turns out that these 
two handle subshells with -e differently:

Cygwin:

$ /bin/sh -e ; echo finished /bin/sh -e, status=$?
$ ( false ; echo continuing )
finished /bin/sh -e, status=1
$ 

Debian:

$ /bin/sh -e ; echo finished /bin/sh -e, status=$?
$ ( false ; echo continuing )
$ 

In both cases, the subshell exits as soon as one of its commands returns 
false.  But in Cygwin, the parent shell exits too; in Debian, it doesn't.  
It was the Debian behavior that I reported earlier.  My mistake.

The Cygwin behavior above is consistent with the ash man page.  It also 
means that all of the 's in the generic-build-script are definitely not 
needed.  With /bin/sh -e, as soon as any command in a subshell returns 
false, the subshell and parent shell exit.  That's the purpose of the 's, 
so they can go.

I tested this behavior by inserting some failing commands into some of the 
gbs functions, and running the script.  With /bin/sh -e at the top, it 
halted at the first false result.

So the patch I posted yesterday is still correct.
Andrew.