automake
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Automake 1.4l released


From: Tim Van Holder
Subject: Re: Automake 1.4l released
Date: Mon, 13 Aug 2001 22:43:55 +0200

> > So IMHO, cygwin should recognize the "unusual" behaviour of NTFS, and
> > perhaps internally do 'chmod +w; touch; chmod -w' when changing the
> > timestamp of a read-only file.
> 
> Omygod.  You have NO idea how much overhead the necessary checks would
> add -- it would slow down file access on cygwin to a crawl.

Come on - does adding the code below to the utime() function add that much
overhead?  Getting the attributes should amount to a single system call;
the same goes for setting them, and that is only needed if the file isn't
writeable (if the overhead is noticeable, it might be necessary to check
for NTFS-ness of the target, but I suspect always doing the chmod would
be less overhead).

  curr_attr = GetFileAttr ("file");
  if (!WRITABLE(curr_attr))
    SetFileAttr ("file", WRITEABLE_ATTR);
  ...
  if (!WRITABLE(curr_attr))
    SetFileAttr ("file", curr_attr);
    
(note: function names are mock-ups, but you get the idea)

Anyway, this is really something that should be talked over on the
cygwin mailing list (maybe you could make it a PR?) - my point was
merely that I consider the cygwin/NTFS behaviour unusual, as a file's
readonly attribute generally applies to the file, not the metadata
kept by the file system for that file.

> I still have not heard a cogent explanation about WHY "chmod -R go-w" is
> undesirable -- for any filesystem.  Why is 'chmod -R a-w' used in the
> distdir: target?  Is it just "that's the way it's always been done?"
> 
> What am I missing?

I can't answer that one - one of the automake gurus (Tom?) will have to
explain that.  Perhaps to avoid surprises when building from a readonly
medium?




reply via email to

[Prev in Thread] Current Thread [Next in Thread]