This is the mail archive of the cygwin-apps mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [ITA] - base-files


Hello,

I have a base-files-4.0-1 package ready to receive testing. You can fetch it
from this URL:

http://www.eco-lution.tv/cygwin/release/base-files/base-files-4.0-1.tar.bz2
http://www.eco-lution.tv/cygwin/release/base-files/base-files-4.0-1.tar.bz2.sig

md5sums:
ff8000e0c128c9a7732d17c5eaace129  base-files-4.0-1.tar.bz2
bcdea646fcf7038f0796c68838759829  base-files-4.0-1.tar.bz2.sig

Setup.hint is unchanged.

I'd like to explain the most important change I've made, and also the
purpose of that change.

I have decided to pull out of /etc/profile the case switch that tries
to detect the shell and sets PS1 (and HOSTNAME) accordingly. 
The reason for this change is that all of bash, mksh, zsh and tcsh, provide 
their own files for doing that job. The result is a lighter /etc/profile 
that sets a minimun PS1='$ ' that will be used by posh and dash (the only 
two shells in the repo that lack specific startup files), allowing shells 
that do have that files to alter this setting(s).
Notice that neither posh nor mksh, despite being ksh derivatives, read
/etc/ksh.kshrc nor ~/.kshrc.

(I=interactive,L=login,N=non-interactive,B=bash,M=mksh,Z=zsh,T=tcsh,O=posh,dash,!=not)
BL=> /etc/profile -> ~/.bash_profile -> ~/.bashrc -> /etc/bash.bashrc
BI!L=> /etc/bash.bashrc -> ~/.bashrc
ML=> /etc/profile -> ~/.mkshrc -> /etc/mkshrc
MI!L=> ~/.mkshrc -> /etc/mkshrc
OL=> /etc/profile -> ~/.profile (as of now, /etc/profile is not posh-compatible!!)
ZL&ZI!L=> Well... the startup routines for zsh are complicated enough to let the end
users craft their own environment (IMHO).

It's in the system-wide /etc/${SHELL}rc where PS1 and HOSTNAME are defined 
now (overriding the /etc/profile default). Also, the logic that sources 
/etc/profile.d/ scripts will be included there, to avoid the current situation, 
where /etc/profile sources everything under /etc/profile.d, regardless 
the calling shell (bash sources /etc/profile.d/*.zsh)

This changes solve the reported bug about interactive shells with a 
non-interactive ancestor presenting an unset PS1 prompt.
The bug was reported regarding bash, but this logic should apply to
every shell now.

Also, the reported bug about mksh not having a well-defined PS1 can
be considered solved, since mksh will set its own PS1 in /etc/mkshrc,
sourced by ~/.mkshrc. For completeness, a skeleletal .mkshrc is provided 
now which sources a system-wide /etc/mkshrc. Should that file be provided 
by the mksh mantainer and installed in /etc/defaults/etc/mkshrc ?

As of now, this is the panorama: three shells offer a default system-wide rc 
file in their packages, dash and posh won't use it and bash's is included in 
base-files, though only two of them install it per default (tcsh and bash). 
It would be better if all shells unify their criteria regarding this.

$ cygcheck -l zsh mksh tcsh dash posh bash | grep rc$
/usr/share/doc/mksh/examples/dot.mkshrc
/etc/defaults/etc/csh.cshrc
/usr/share/doc/zsh-4.3.10/StartupFiles/etc/zshrc

All changes (and bugfixes) included in this release are detailed in the 
ChangeLog.

Whilst I've tried to be thorough, there are probably errors/bugs, so
I'd appreciate any testing people can give to this, in order to find
them. TIA, and sorry for the long post.

-- 
Huella de clave primaria: 0FDA C36F F110 54F4 D42B  D0EB 617D 396C 448B 31EB

Attachment: signature.asc
Description: Digital signature


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]