This is the mail archive of the cygwin 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: Problems with the new base-files-4.0-5?


On Thu, Mar 17, 2011 at 04:10:27PM -0500, Nellis, Kenneth wrote:
> > From: Eric Blake
> > On 03/17/2011 12:59 PM, Angelo Graziosi wrote:
> > > Il 17/03/2011 19.00, Angelo Graziosi ha scritto:
> > >> I have just updated Cygwin, and now starting a console (Cygwin.bat
> > or
> > >> MinTTY) prints:
> > >>
> > >> -bash: ${p}: ambiguous redirect
> > >>
> > >> and PRINTER variable isn't set.
> > >>
> > >> Reverting to base-files-4.0-4 works just fine and PRINTER is set
> > >> correctly to my default printer.
> > >>
> > >> In 4.0-5 it seems something is broken in /etc/profile.
> 
> I see the same thing.
> 
> > > Perhaps you need this:
> > >
> > > - ([[ -e ${p} ]] && read -r PRINTER < ${p}) && PRINTER=${PRINTER%%,*}
> > > + ([[ -e ${p} ]] && read -r PRINTER < "${p}") &&
> > PRINTER=${PRINTER%%,*}

Please test if

[ -e "${p}" ] && read -r PRINTER < "${p}" && PRINTER=${PRINTER%%,*}

works as expected. 

> > /etc/profile is using [[ ]]?  Bad.  That's not required by POSIX, and
> > will break for anyone who logs in with a shell that doesn't understand
> > it (for example, dash or posh).  Bashisms should not appear in
> > /etc/profile.
> 
> Seems there are several instances of this:
> 
> $ grep '\[\[' /etc/profile
> ([[ -e ${p} ]] && read -r PRINTER < ${p}) && PRINTER=${PRINTER%%,*}
> if [[ -n ${BASH_VERSION} ]]; then
>   [[ -f "/etc/bash.bashrc" ]] && . "/etc/bash.bashrc"
> elif [[ -n ${KSH_VERSION} ]]; then
> elif [[ -n ${ZSH_VERSION} ]]; then
> $

Corrected. Included in the next release.

> Is it reasonable to presume a quick turnaround on a fix?

Yes. It will be available ASAP.

-- 
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]