public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* GOLD STAR! (was Re: [ANNOUNCEMENT] [1.7] Updated: dash-0.5.5.1-2;  Obsolete: ash)
  2009-07-14 15:36 [ANNOUNCEMENT] [1.7] Updated: dash-0.5.5.1-2; Obsolete: ash Eric Blake
@ 2009-07-14 15:36 ` Corinna Vinschen
  2010-01-21 15:01 ` [ANNOUNCEMENT] [1.7] Updated: dash-0.5.5.1-2; Obsolete: ash Edward Lam
  1 sibling, 0 replies; 16+ messages in thread
From: Corinna Vinschen @ 2009-07-14 15:36 UTC (permalink / raw)
  To: cygwin

Wohooo!

On Jul 14 06:29, Eric Blake wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> The package dash has been upgraded to 0.5.5.1-2 for those using cygwin
> 1.7, simultaneously replacing dash-0.5.5.1-1 and ash-20040127-4.  The ash
> package is now obsolete; ash.exe is provided by the dash package.

This is worth another gold star.  Finally we're rid of the stone-age old
ash codebase used for Cygwin only.  I'm planning to mark this day in the
calendar and to celebrate it every year.

Thanks Eric!


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat

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

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

* [ANNOUNCEMENT] [1.7] Updated: dash-0.5.5.1-2; Obsolete: ash
@ 2009-07-14 15:36 Eric Blake
  2009-07-14 15:36 ` GOLD STAR! (was Re: [ANNOUNCEMENT] [1.7] Updated: dash-0.5.5.1-2; Obsolete: ash) Corinna Vinschen
  2010-01-21 15:01 ` [ANNOUNCEMENT] [1.7] Updated: dash-0.5.5.1-2; Obsolete: ash Edward Lam
  0 siblings, 2 replies; 16+ messages in thread
From: Eric Blake @ 2009-07-14 15:36 UTC (permalink / raw)
  To: cygwin

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

The package dash has been upgraded to 0.5.5.1-2 for those using cygwin
1.7, simultaneously replacing dash-0.5.5.1-1 and ash-20040127-4.  The ash
package is now obsolete; ash.exe is provided by the dash package.

NEWS:
=====
This is a minor patch release of dash.  It adds a patch for rudimentary
LINENO support (the reported numbers are no less precise than what is
reported in shell syntax errors, but multi-line compound statements sure
leave a lot to be desired).  It also makes ash become a synonym for dash
(obsoleting the older ash package with its slew of POSIX non-compliance
bugs).  For now, there are no plans of replacing /bin/sh with dash.

See also the upstream documentation in /usr/share/doc/dash/.

DESCRIPTION:
============
DASH is a POSIX-compliant implementation of /bin/sh that aims to be as
small as possible. It does this without sacrificing speed where possible.
In fact, it is significantly faster than bash (the GNU Bourne-Again SHell)
for most tasks.

UPDATE:
=======
To update your installation, click on the "Install Cygwin now" link on the
http://cygwin.com/ web page.  This downloads setup.exe to your system.
Save it and run setup, answer the questions and pick up 'dash' from the
'Base' or 'Shells' category (it should already be automatically selected).
 Be sure that you do not have any cygwin programs running during the upgrade.

DOWNLOAD:
=========
Note that downloads from cygwin.com aren't allowed due to bandwidth
limitations.  This means that you will need to find a mirror which has
this update, please choose the one nearest to you:
http://cygwin.com/mirrors.html

QUESTIONS:
==========
If you want to make a point or ask a question the Cygwin mailing list is
the appropriate place.

- --
Eric Blake
volunteer cygwin dash maintainer

CYGWIN-ANNOUNCE UNSUBSCRIBE INFO:
=================================
To unsubscribe to the cygwin-announce mailing list, look at the
"List-Unsubscribe: " tag in the email header of this message.  Send email
to the address specified there.  It will be in the format:

cygwin-announce-unsubscribe-YOU=YOURDOMAIN.COM@cygwin.com

If you need more information on unsubscribing, start reading here:

http://sourceware.org/lists.html#unsubscribe-simple

Please read *all* of the information on unsubscribing that is available
starting at this URL.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkpceisACgkQ84KuGfSFAYB0kACbBVCuJQt7byzPK9UbVdIecOxK
/ScAmwSlzkVbdvK0maBtW37By0f3wQ6d
=wvFX
-----END PGP SIGNATURE-----

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

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

* Re: [ANNOUNCEMENT] [1.7] Updated: dash-0.5.5.1-2; Obsolete: ash
  2009-07-14 15:36 [ANNOUNCEMENT] [1.7] Updated: dash-0.5.5.1-2; Obsolete: ash Eric Blake
  2009-07-14 15:36 ` GOLD STAR! (was Re: [ANNOUNCEMENT] [1.7] Updated: dash-0.5.5.1-2; Obsolete: ash) Corinna Vinschen
@ 2010-01-21 15:01 ` Edward Lam
  2010-01-21 16:03   ` Christopher Faylor
  2010-01-22  4:15   ` Eric Blake
  1 sibling, 2 replies; 16+ messages in thread
From: Edward Lam @ 2010-01-21 15:01 UTC (permalink / raw)
  To: cygwin

Eric Blake wrote:
> The package dash has been upgraded to 0.5.5.1-2 for those using cygwin
> 1.7, simultaneously replacing dash-0.5.5.1-1 and ash-20040127-4.  The ash
> package is now obsolete; ash.exe is provided by the dash package.

I know I'm slow but I just updated to this cygwin change and running 
into a snag. In our build process, we rely on using DOS file paths and 
dash seems to NOT support them. It's impractical for me to properly use 
POSIX paths because of the effort required to convert such a large 
project (it was ported to Windows in 1996 back when we were using Cygnus 
B20.1(?)). I tried to go look for ash but couldn't find it anymore. 
Using bash seems to cause other problems in the build process (and of 
course it's also dog slow on this complicated project). Any ideas?

Thanks,
-Edward

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

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

* Re: [ANNOUNCEMENT] [1.7] Updated: dash-0.5.5.1-2; Obsolete: ash
  2010-01-21 15:01 ` [ANNOUNCEMENT] [1.7] Updated: dash-0.5.5.1-2; Obsolete: ash Edward Lam
@ 2010-01-21 16:03   ` Christopher Faylor
  2010-01-22  4:15   ` Eric Blake
  1 sibling, 0 replies; 16+ messages in thread
From: Christopher Faylor @ 2010-01-21 16:03 UTC (permalink / raw)
  To: cygwin

On Thu, Jan 21, 2010 at 09:12:25AM -0500, Edward Lam wrote:
>Eric Blake wrote:
>> The package dash has been upgraded to 0.5.5.1-2 for those using cygwin
>> 1.7, simultaneously replacing dash-0.5.5.1-1 and ash-20040127-4.  The ash
>> package is now obsolete; ash.exe is provided by the dash package.
>
>I know I'm slow but I just updated to this cygwin change and running 
>into a snag. In our build process, we rely on using DOS file paths and 
>dash seems to NOT support them. It's impractical for me to properly use 
>POSIX paths because of the effort required to convert such a large 
>project (it was ported to Windows in 1996 back when we were using Cygnus 
>B20.1(?)). I tried to go look for ash but couldn't find it anymore. 
>Using bash seems to cause other problems in the build process (and of 
>course it's also dog slow on this complicated project). Any ideas?

You could always build your own version of ash.

There is also the Cygwin Time Machine:
http://www.fruitbat.org/Cygwin/index.html#cygwincirca

cgf

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

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

* Re: [ANNOUNCEMENT] [1.7] Updated: dash-0.5.5.1-2; Obsolete: ash
  2010-01-21 15:01 ` [ANNOUNCEMENT] [1.7] Updated: dash-0.5.5.1-2; Obsolete: ash Edward Lam
  2010-01-21 16:03   ` Christopher Faylor
@ 2010-01-22  4:15   ` Eric Blake
  2010-03-05 14:11     ` Edward Lam
  1 sibling, 1 reply; 16+ messages in thread
From: Eric Blake @ 2010-01-22  4:15 UTC (permalink / raw)
  To: cygwin, Edward Lam

[-- Attachment #1: Type: text/plain, Size: 1135 bytes --]

According to Edward Lam on 1/21/2010 7:12 AM:
> DOS file paths and dash seems to NOT support them

Huh?  Give an example.  dash supports DOS paths the same as bash.  That
is, if the : doesn't already cause other problems (as in tar), then the
DOS path is handed on to native windows (and you get the nodosfiles
warning from cygwin1.dll on the first use).

> I tried to go look for ash but couldn't find it anymore.

dash IS ash - the dash project is a modernized port of the old ash code
base, with the goal of being even faster and more POSIX-compliant.

> Using bash seems to cause other problems in the build process (and of
> course it's also dog slow on this complicated project). Any ideas?

I'm not going out of my way to do anything for DOS paths other than what
you happen to get for free; if they work, great; if they don't, you've
been warned that POSIX paths are the way to go in cygwin.  If you REALLY
want DOS paths and faster execution, look to mingw, not cygwin.

-- 
Don't work too hard, make some time for fun as well!

Eric Blake             ebb9@byu.net
volunteer cygwin dash maintainer


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 320 bytes --]

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

* Re: [ANNOUNCEMENT] [1.7] Updated: dash-0.5.5.1-2; Obsolete: ash
  2010-01-22  4:15   ` Eric Blake
@ 2010-03-05 14:11     ` Edward Lam
  2010-03-05 15:33       ` Corinna Vinschen
  0 siblings, 1 reply; 16+ messages in thread
From: Edward Lam @ 2010-03-05 14:11 UTC (permalink / raw)
  To: Eric Blake; +Cc: cygwin

Eric Blake wrote:
> According to Edward Lam on 1/21/2010 7:12 AM:
>> DOS file paths and dash seems to NOT support them
> 
> Huh?  Give an example.  dash supports DOS paths the same as bash.  That
> is, if the : doesn't already cause other problems (as in tar), then the
> DOS path is handed on to native windows (and you get the nodosfiles
> warning from cygwin1.dll on the first use).

Sorry for the slow reply on this one as I had just given up and gone 
from sh to bash. Here's a reproducible case (starting with bash as the 
initial shell).

$ cygcheck -c cygwin dash bash
Cygwin Package Information
Package              Version        Status
bash                 3.2.49-23      OK
cygwin               1.7.1-1        OK
dash                 0.5.5.1-2      OK
$ echo $CYGWIN
nodosfilewarning
$ bash
$ cd c:/
$ pwd
/c
$ export FOO=c:/windows
$ cd $FOO
$ pwd
/c/windows
$ cd c:/
$ pwd
/c
$ dash
$ export FOO=c:/windows
$ cd $FOO
cd: 2: can't cd to c:/windows
$ exit

We rely on being able to perform "cd $FOO" where FOO is a DOS file path 
and this used to work in the old ash.

Regards,
-Edward


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

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

* Re: [ANNOUNCEMENT] [1.7] Updated: dash-0.5.5.1-2; Obsolete: ash
  2010-03-05 14:11     ` Edward Lam
@ 2010-03-05 15:33       ` Corinna Vinschen
  2010-03-05 17:00         ` Edward Lam
  2010-03-05 17:10         ` [ANNOUNCEMENT] [1.7] Updated: dash-0.5.5.1-2; Obsolete: ash Edward Lam
  0 siblings, 2 replies; 16+ messages in thread
From: Corinna Vinschen @ 2010-03-05 15:33 UTC (permalink / raw)
  To: cygwin

On Mar  5 09:08, Edward Lam wrote:
> Eric Blake wrote:
> >According to Edward Lam on 1/21/2010 7:12 AM:
> >>DOS file paths and dash seems to NOT support them
> >
> >Huh?  Give an example.  dash supports DOS paths the same as bash.  That
> >is, if the : doesn't already cause other problems (as in tar), then the
> >DOS path is handed on to native windows (and you get the nodosfiles
> >warning from cygwin1.dll on the first use).
> 
> Sorry for the slow reply on this one as I had just given up and gone
> from sh to bash. Here's a reproducible case (starting with bash as
> the initial shell).
> 
> $ cygcheck -c cygwin dash bash
> Cygwin Package Information
> Package              Version        Status
> bash                 3.2.49-23      OK
> cygwin               1.7.1-1        OK
> dash                 0.5.5.1-2      OK
> $ echo $CYGWIN
> nodosfilewarning
> $ bash
> $ cd c:/
> $ pwd
> /c
> $ export FOO=c:/windows
> $ cd $FOO
> $ pwd
> /c/windows
> $ cd c:/
> $ pwd
> /c
> $ dash
> $ export FOO=c:/windows
> $ cd $FOO
> cd: 2: can't cd to c:/windows
> $ exit
> 
> We rely on being able to perform "cd $FOO" where FOO is a DOS file
> path and this used to work in the old ash.

Is that a case-sensitivity issue, perhaps?  See
http://cygwin.com/cygwin-ug-net/using-specialnames.html#pathnames-casesensitive


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat

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

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

* Re: [ANNOUNCEMENT] [1.7] Updated: dash-0.5.5.1-2; Obsolete: ash
  2010-03-05 15:33       ` Corinna Vinschen
@ 2010-03-05 17:00         ` Edward Lam
  2010-03-05 17:01           ` Edward Lam
  2010-03-05 17:20           ` Eric Blake
  2010-03-05 17:10         ` [ANNOUNCEMENT] [1.7] Updated: dash-0.5.5.1-2; Obsolete: ash Edward Lam
  1 sibling, 2 replies; 16+ messages in thread
From: Edward Lam @ 2010-03-05 17:00 UTC (permalink / raw)
  To: cygwin

Corinna Vinschen wrote:
> Is that a case-sensitivity issue, perhaps?  See
> http://cygwin.com/cygwin-ug-net/using-specialnames.html#pathnames-casesensitive

I don't see how it is:

$ dash
$ cd /c
$ ls -d W*
WINDOWS
$ cd c:/WINDOWS
cd: 3: can't cd to c:/WINDOWS
$ cd C:/WINDOWS
cd: 4: can't cd to C:/WINDOWS

Any more ideas?

Thanks,
-Edward

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

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

* Re: [ANNOUNCEMENT] [1.7] Updated: dash-0.5.5.1-2; Obsolete: ash
  2010-03-05 17:00         ` Edward Lam
@ 2010-03-05 17:01           ` Edward Lam
  2010-03-05 17:06             ` Edward Lam
  2010-03-05 17:20           ` Eric Blake
  1 sibling, 1 reply; 16+ messages in thread
From: Edward Lam @ 2010-03-05 17:01 UTC (permalink / raw)
  To: cygwin

Edward Lam wrote:
> Corinna Vinschen wrote:
>> Is that a case-sensitivity issue, perhaps?  See
>> http://cygwin.com/cygwin-ug-net/using-specialnames.html#pathnames-casesensitive 
>>
> 
> I don't see how it is:
> 
> $ dash
> $ cd /c
> $ ls -d W*
> WINDOWS
> $ cd c:/WINDOWS
> cd: 3: can't cd to c:/WINDOWS
> $ cd C:/WINDOWS
> cd: 4: can't cd to C:/WINDOWS

Oops, forgot to add this:

$ regtool get "/HKLM/SYSTEM/CurrentControlSet/Control/Session 
Manager/kernel/obcaseinsensitive"
1


-Edward

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

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

* Re: [ANNOUNCEMENT] [1.7] Updated: dash-0.5.5.1-2; Obsolete: ash
  2010-03-05 17:01           ` Edward Lam
@ 2010-03-05 17:06             ` Edward Lam
  0 siblings, 0 replies; 16+ messages in thread
From: Edward Lam @ 2010-03-05 17:06 UTC (permalink / raw)
  To: cygwin

Edward Lam wrote:
> Edward Lam wrote:
>> Corinna Vinschen wrote:
>>> Is that a case-sensitivity issue, perhaps?  See
>>> http://cygwin.com/cygwin-ug-net/using-specialnames.html#pathnames-casesensitive 
>>>
>>
>> I don't see how it is:
>>
>> $ dash
>> $ cd /c
>> $ ls -d W*
>> WINDOWS
>> $ cd c:/WINDOWS
>> cd: 3: can't cd to c:/WINDOWS
>> $ cd C:/WINDOWS
>> cd: 4: can't cd to C:/WINDOWS
> 
> Oops, forgot to add this:
> 
> $ regtool get "/HKLM/SYSTEM/CurrentControlSet/Control/Session 
> Manager/kernel/obcaseinsensitive"
> 1

And this...

$ mount
C:/cygwin/bin on /usr/bin type ntfs (binary,auto)
C:/cygwin/lib on /usr/lib type ntfs (binary,auto)
C:/cygwin on / type ntfs (binary,auto)
C: on /c type ntfs (binary,posix=0,user,noumount,auto)


-Edward

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

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

* Re: [ANNOUNCEMENT] [1.7] Updated: dash-0.5.5.1-2; Obsolete: ash
  2010-03-05 15:33       ` Corinna Vinschen
  2010-03-05 17:00         ` Edward Lam
@ 2010-03-05 17:10         ` Edward Lam
  1 sibling, 0 replies; 16+ messages in thread
From: Edward Lam @ 2010-03-05 17:10 UTC (permalink / raw)
  To: cygwin

Corinna Vinschen wrote:
> Is that a case-sensitivity issue, perhaps?  See
> http://cygwin.com/cygwin-ug-net/using-specialnames.html#pathnames-casesensitive

And in case you missed this the first time, it works fine in bash

>> $ bash
>> $ cd c:/
>> $ pwd
>> /c
>> $ export FOO=c:/windows
>> $ cd $FOO
>> $ pwd
>> /c/windows


-Edward

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

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

* Re: [ANNOUNCEMENT] [1.7] Updated: dash-0.5.5.1-2; Obsolete: ash
  2010-03-05 17:00         ` Edward Lam
  2010-03-05 17:01           ` Edward Lam
@ 2010-03-05 17:20           ` Eric Blake
  2010-03-05 17:40             ` Corinna Vinschen
  1 sibling, 1 reply; 16+ messages in thread
From: Eric Blake @ 2010-03-05 17:20 UTC (permalink / raw)
  To: cygwin

[-- Attachment #1: Type: text/plain, Size: 1073 bytes --]

According to Edward Lam on 3/5/2010 9:55 AM:
> Corinna Vinschen wrote:
>> Is that a case-sensitivity issue, perhaps?  See
>> http://cygwin.com/cygwin-ug-net/using-specialnames.html#pathnames-casesensitive
>>
> 
> I don't see how it is:
> 
> $ dash
> $ cd /c
> $ ls -d W*
> WINDOWS
> $ cd c:/WINDOWS
> cd: 3: can't cd to c:/WINDOWS

Let's rule out bash vs. dash complexities, and first focus on whether
cygwin1.dll might be at fault.  Untested code:

#include <unistd.h>
#include <stdio.h>
#include <string.h>
#include <errno.h>
int main(int argc, char**argv)
{
  int e = chdir(argv[1]);
  char *cwd = getcwd(NULL,0);
  return printf ("chdir to %s: %d(%s), now in %s\n", argv[1],
    e, strerror(e), cwd);
}

That alone will give insights into whether you should even be expecting
this to work.  The difference between bash and dash is that bash spends
more time calling cygwin conversion routines in advance of attempting chdir.

-- 
Eric Blake   eblake@redhat.com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 320 bytes --]

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

* Re: [ANNOUNCEMENT] [1.7] Updated: dash-0.5.5.1-2; Obsolete: ash
  2010-03-05 17:20           ` Eric Blake
@ 2010-03-05 17:40             ` Corinna Vinschen
  2010-03-05 20:11               ` Edward Lam
  2011-12-03 22:11               ` Eric Blake
  0 siblings, 2 replies; 16+ messages in thread
From: Corinna Vinschen @ 2010-03-05 17:40 UTC (permalink / raw)
  To: cygwin

On Mar  5 10:10, Eric Blake wrote:
> According to Edward Lam on 3/5/2010 9:55 AM:
> > Corinna Vinschen wrote:
> >> Is that a case-sensitivity issue, perhaps?  See
> >> http://cygwin.com/cygwin-ug-net/using-specialnames.html#pathnames-casesensitive
> >>
> > 
> > I don't see how it is:
> > 
> > $ dash
> > $ cd /c
> > $ ls -d W*
> > WINDOWS
> > $ cd c:/WINDOWS
> > cd: 3: can't cd to c:/WINDOWS
> 
> Let's rule out bash vs. dash complexities, and first focus on whether
> cygwin1.dll might be at fault.  Untested code:
> 
> #include <unistd.h>
> #include <stdio.h>
> #include <string.h>
> #include <errno.h>
> int main(int argc, char**argv)
> {
>   int e = chdir(argv[1]);
>   char *cwd = getcwd(NULL,0);
>   return printf ("chdir to %s: %d(%s), now in %s\n", argv[1],
>     e, strerror(e), cwd);
> }

Works fine in Cygwin, I just tested it:

  # cat > chdir.c << EOF
  #include <stdio.h>
  #include <limits.h>

  int
  main (int argc, char **argv)
  {
    int ret = 0;
    if (argc > 1)
      ret = chdir (argv[1]);
    if (ret)
      perror ("chdir");
    else
      {
	char buf[PATH_MAX];
	getcwd (buf, PATH_MAX);
	printf ("pwd: %s\n", buf);
      }
    return ret ? 1 : 0;
  }
  EOF
  $ gcc -g -o chdir chdir.c
  $ ./chdir C:/Windows
  pwd: /cygdrive/c/Windows

It's a problem in dash apparently.  Btw., tcsh also has a problem
with DOS paths, if you use backslashes, see the prompt:

  [~]$ cd C:\\Windows
  [~/C:\Windows]$ pwd
  /cygdrive/c/Windows

I just don't care enough for DOS paths so I won't fix.


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat

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

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

* Re: [ANNOUNCEMENT] [1.7] Updated: dash-0.5.5.1-2; Obsolete: ash
  2010-03-05 17:40             ` Corinna Vinschen
@ 2010-03-05 20:11               ` Edward Lam
  2011-12-03 22:11               ` Eric Blake
  1 sibling, 0 replies; 16+ messages in thread
From: Edward Lam @ 2010-03-05 20:11 UTC (permalink / raw)
  To: cygwin

Corinna Vinschen wrote:
> On Mar  5 10:10, Eric Blake wrote:
>> Let's rule out bash vs. dash complexities, and first focus on whether
>> cygwin1.dll might be at fault.  Untested code:
>>
>> #include <unistd.h>
>> #include <stdio.h>
>> #include <string.h>
>> #include <errno.h>
>> int main(int argc, char**argv)
>> {
>>   int e = chdir(argv[1]);
>>   char *cwd = getcwd(NULL,0);
>>   return printf ("chdir to %s: %d(%s), now in %s\n", argv[1],
>>     e, strerror(e), cwd);
>> }
> 
> Works fine in Cygwin, I just tested it:

This also works fine on my system:

$ ./chdir c:/WINDOWS
chdir to c:/WINDOWS: 0(No error), now in /c/WINDOWS


-Edward

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

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

* Re: [ANNOUNCEMENT] [1.7] Updated: dash-0.5.5.1-2; Obsolete: ash
  2010-03-05 17:40             ` Corinna Vinschen
  2010-03-05 20:11               ` Edward Lam
@ 2011-12-03 22:11               ` Eric Blake
  2013-03-28 15:08                 ` [PATCH] Support DOS paths in dash Edward Lam
  1 sibling, 1 reply; 16+ messages in thread
From: Eric Blake @ 2011-12-03 22:11 UTC (permalink / raw)
  To: cygwin

[-- Attachment #1: Type: text/plain, Size: 1144 bytes --]

On 03/05/2010 10:20 AM, Corinna Vinschen wrote:

Rounding out a (super-old) thread on my dash todo list...

>>> $ dash
>>> $ cd /c
>>> $ ls -d W*
>>> WINDOWS
>>> $ cd c:/WINDOWS
>>> cd: 3: can't cd to c:/WINDOWS
>>
>> Let's rule out bash vs. dash complexities, and first focus on whether
>> cygwin1.dll might be at fault.

> 
> Works fine in Cygwin, I just tested it:
...
>   $ gcc -g -o chdir chdir.c
>   $ ./chdir C:/Windows
>   pwd: /cygdrive/c/Windows
> 
> It's a problem in dash apparently.

I finally spent time in gdb figuring out what's going on.

The problem is that dash tries to convert c:/windows to an absolute
path, since it doesn't start with /.  I suppose I could teach dash to
recognize [letter]:/ as absolute paths, although that makes dash larger,
and puts a burden on me (since I can guarantee upstream dash won't
accept such a patch).

> I just don't care enough for DOS paths so I won't fix.

Me neither.  And since you can use /cygdrive/c, not c:/, I won't bother
to fix it.

-- 
Eric Blake   eblake@redhat.com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 620 bytes --]

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

* [PATCH] Support DOS paths in dash
  2011-12-03 22:11               ` Eric Blake
@ 2013-03-28 15:08                 ` Edward Lam
  0 siblings, 0 replies; 16+ messages in thread
From: Edward Lam @ 2013-03-28 15:08 UTC (permalink / raw)
  To: cygwin

[-- Attachment #1: Type: text/plain, Size: 1310 bytes --]

Hi Folks,

I finally got down to looking at how to fix this in dash and came up 
with the attached patch (against dash-0.5.7). It's simple enough and so 
cd now works.

Please consider this for Cygwin.

Thanks!

-Edward

On 03/12/2011 5:11 PM, Eric Blake wrote:
> On 03/05/2010 10:20 AM, Corinna Vinschen wrote:
>
> Rounding out a (super-old) thread on my dash todo list...
>
>>>> $ dash
>>>> $ cd /c
>>>> $ ls -d W*
>>>> WINDOWS
>>>> $ cd c:/WINDOWS
>>>> cd: 3: can't cd to c:/WINDOWS
>>>
>>> Let's rule out bash vs. dash complexities, and first focus on whether
>>> cygwin1.dll might be at fault.
>
>>
>> Works fine in Cygwin, I just tested it:
> ...
>>    $ gcc -g -o chdir chdir.c
>>    $ ./chdir C:/Windows
>>    pwd: /cygdrive/c/Windows
>>
>> It's a problem in dash apparently.
>
> I finally spent time in gdb figuring out what's going on.
>
> The problem is that dash tries to convert c:/windows to an absolute
> path, since it doesn't start with /.  I suppose I could teach dash to
> recognize [letter]:/ as absolute paths, although that makes dash larger,
> and puts a burden on me (since I can guarantee upstream dash won't
> accept such a patch).
>
>> I just don't care enough for DOS paths so I won't fix.
>
> Me neither.  And since you can use /cygdrive/c, not c:/, I won't bother
> to fix it.
>


[-- Attachment #2: dash-0.5.7-cd.patch --]
[-- Type: text/plain, Size: 543 bytes --]

--- src/cd.c	2011-03-15 03:18:06.000000000 -0400
+++ src/cd.new.c	2013-03-28 11:03:32.649576500 -0400
@@ -38,6 +38,9 @@
 #include <string.h>
 #include <unistd.h>
 #include <limits.h>
+#ifdef __CYGWIN__
+#include <sys/cygwin.h>
+#endif
 
 /*
  * The cd and pwd commands.
@@ -194,6 +197,11 @@
 	char *cdcomppath;
 	const char *lim;
 
+#ifdef __CYGWIN__
+        char pathbuf[PATH_MAX + 1];
+        cygwin_conv_to_full_posix_path (dir, pathbuf);
+	 dir = pathbuf;
+#endif
 	cdcomppath = sstrdup(dir);
 	STARTSTACKSTR(new);
 	if (*dir != '/') {


[-- Attachment #3: Type: text/plain, Size: 218 bytes --]

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

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

end of thread, other threads:[~2013-03-28 15:08 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-07-14 15:36 [ANNOUNCEMENT] [1.7] Updated: dash-0.5.5.1-2; Obsolete: ash Eric Blake
2009-07-14 15:36 ` GOLD STAR! (was Re: [ANNOUNCEMENT] [1.7] Updated: dash-0.5.5.1-2; Obsolete: ash) Corinna Vinschen
2010-01-21 15:01 ` [ANNOUNCEMENT] [1.7] Updated: dash-0.5.5.1-2; Obsolete: ash Edward Lam
2010-01-21 16:03   ` Christopher Faylor
2010-01-22  4:15   ` Eric Blake
2010-03-05 14:11     ` Edward Lam
2010-03-05 15:33       ` Corinna Vinschen
2010-03-05 17:00         ` Edward Lam
2010-03-05 17:01           ` Edward Lam
2010-03-05 17:06             ` Edward Lam
2010-03-05 17:20           ` Eric Blake
2010-03-05 17:40             ` Corinna Vinschen
2010-03-05 20:11               ` Edward Lam
2011-12-03 22:11               ` Eric Blake
2013-03-28 15:08                 ` [PATCH] Support DOS paths in dash Edward Lam
2010-03-05 17:10         ` [ANNOUNCEMENT] [1.7] Updated: dash-0.5.5.1-2; Obsolete: ash Edward Lam

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