Re: mkdir -p and EROFS

2005-10-13 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 According to Paul Eggert on 10/12/2005 3:24 PM: > Thanks for reporting this. It is indeed a bug in > coreutils/lib/mkdir-p.c. It can be triggered by other errors too. > This is hard to write a test case for, but I'd like to fix things. > Does the fol

Re: mkdir -p and EROFS

2005-10-13 Thread Corinna Vinschen
On Oct 13 00:02, Paul Eggert wrote: > Christopher Faylor writes: > > I'm just wondering if there is some kind of official coreutils policy > > here. > > Not for coreutils itself, no. However, the GNU coding standards make > it clear that porting to systems like Cygwin is lower priority for the >

Re: mkdir -p and EROFS

2005-10-13 Thread Jim Meyering
Christopher Faylor <[EMAIL PROTECTED]> wrote: ... >>IMHO, it is the kernel's job to provide an informative and, above all, >>compatible-with-most-others errno value, unless there is a very >>good reason. The small extra expense of an lstat call (*but only upon >>failure with errno == EROFS*) doesn

Re: mkdir -p and EROFS

2005-10-13 Thread Jim Meyering
Paul Eggert <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] (Eric Blake) writes: >> The algorithm change between 5.3.0 and 5.90 in lib/mkdir-p.c to >> try mkdir() first instead of stat(), and key off of EEXIST, breaks >> when mkdir() fails with EROFS on an intermediate directory when >> the writable

Re: mkdir -p and EROFS

2005-10-13 Thread Paul Eggert
Jim Meyering <[EMAIL PROTECTED]> writes: > Are there `real' environments that use a set-up like you describe, > with a writable file system mounted inside a read-only one? I vaguely recall doing this myself a while back, on a Solaris box. I made /usr read-only, but /usr/tmp was a writeable files

Re: mkdir -p and EROFS

2005-10-12 Thread Eric Blake
> Thanks for reporting this. It is indeed a bug in > coreutils/lib/mkdir-p.c. It can be triggered by other errors too. > This is hard to write a test case for, but I'd like to fix things. > Does the following patch work for you? > 2005-10-12 Paul Eggert <[EMAIL PROTECTED]> > > * mkdir-p

Re: mkdir -p and EROFS

2005-10-12 Thread Paul Eggert
[EMAIL PROTECTED] (Eric Blake) writes: > The algorithm change between 5.3.0 and 5.90 in lib/mkdir-p.c to > try mkdir() first instead of stat(), and key off of EEXIST, breaks > when mkdir() fails with EROFS on an intermediate directory when > the writable directory has been mounted inside a read-on

Re: mkdir -p and EROFS

2005-10-12 Thread Eric Blake
> [EMAIL PROTECTED] (Eric Blake) wrote: > > The algorithm change between 5.3.0 and 5.90 in lib/mkdir-p.c to > > try mkdir() first instead of stat(), and key off of EEXIST, breaks > > when mkdir() fails with EROFS on an intermediate directory when > > the writable directory has been mounted inside a

Re: mkdir -p and EROFS

2005-10-12 Thread Christopher Faylor
On Wed, Oct 12, 2005 at 07:45:40PM +0200, Jim Meyering wrote: >[EMAIL PROTECTED] (Eric Blake) wrote: >> The algorithm change between 5.3.0 and 5.90 in lib/mkdir-p.c to >> try mkdir() first instead of stat(), and key off of EEXIST, breaks >> when mkdir() fails with EROFS on an intermediate directory

Re: mkdir -p and EROFS

2005-10-12 Thread Jim Meyering
[EMAIL PROTECTED] (Eric Blake) wrote: > The algorithm change between 5.3.0 and 5.90 in lib/mkdir-p.c to > try mkdir() first instead of stat(), and key off of EEXIST, breaks > when mkdir() fails with EROFS on an intermediate directory when > the writable directory has been mounted inside a read-only

mkdir -p and EROFS

2005-10-12 Thread Eric Blake
The algorithm change between 5.3.0 and 5.90 in lib/mkdir-p.c to try mkdir() first instead of stat(), and key off of EEXIST, breaks when mkdir() fails with EROFS on an intermediate directory when the writable directory has been mounted inside a read-only tree. For example, on cygwin: $ mkdir -p //E