Corinna Vinschen wrote: > On Jul 28 14:43, Cliff Hones wrote: >> Cliff Hones wrote: >>> .. One further possibly useful piece >>> of informaion - the create timestamps on the odd directories are all the >>> same, and 14 seconds later than the timestamp on the correct "dev" >>> directory. >> Looking at the install log, I see this timestamp matches the time the >> bash.sh postinstall was run, so it would have been this snippet which >> did it, I imagine: >> >> # Install /dev/fd, /dev/std{in,out,err}. The bash builtin test was >> compiled >> # to assume these exist, so use /bin/test to really check. >> DEVDIR="$(cygpath -au "C:/$(cygpath -am /dev/)" | sed >> 's|/c/\(.\):/|/\1/|')" >> mkdir -p "$DEVDIR" || result=1 > > Hmm, this looks kind of fragile. Not to say it looks wrong. > > $ cygpath -am /dev/ > C:/cygwin/dev > > Ok. > > $ echo "C:/$(cygpath -am /dev/)" > C:/C:/cygwin/dev > > Huh? > > $ cygpath -au "C:/$(cygpath -am /dev/)" > /cygdrive/c/C:/cygwin/dev > > Huh^2? > > $ echo "$(cygpath -au "C:/$(cygpath -am /dev/)" | sed 's|/c/\(.\):/|/\1/|')" > /cygdrive/C/cygwin/dev > > That's ok again, but is it always right? I can't believe it.
No - it's not right with my setup - where I have C:\ mounted as /C. With Cygwin 1.5 (which has exactly the same bash.sh) I get DEVDIR=/C/c:/cygwin/dev, and with 1.7 I get /C/C:/cygwin1.7/dev. Interestingly, the 1.7 install seems to have detected my 1.5 mount points and preserved them - I wasn't expecting that. I guess this must have been broken on 1.5 for ages, but did no harm as the create would fail as ":" was invalid in filenames. > Already using the fixed "C:/" in the expression is incorrect, given > that everybody is free to install Cygwin to a non-C: drive. Would it have been a workaround for buggy cygpath or setup.exe in the past? > What this postinstall script should do is just this: > > mkdir -p /dev || result=1 > > or to drop the mkdir entirely since the /dev/ dir has been already > created by the 000-cygwin-post-install.sh script. Quite. -- 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