bug-coreutils
[Top][All Lists]
Advanced

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

Re: [PATCH] install: add -C option to install file only when necessary


From: Kamil Dudka
Subject: Re: [PATCH] install: add -C option to install file only when necessary
Date: Thu, 12 Feb 2009 12:13:58 +0100
User-agent: KMail/1.9.6 (enterprise 0.20071012.724442)

On Wednesday 11 February 2009 17:41:58 you wrote:
> Does any other install implementation provide -C?
> The precedent of RHEL4 is probably enough to justify burning the
> short -C option, but finding at least one more would be better.
Thanks Eric for digging this. Should we mention it in documentation or log 
message?

> No long option?
> How about using --compare?
There is no long option in RHEL4 nor BSD, but it sounds like a good idea to 
me.

> > +  /* compare files using stat */
> > +  if (stat (file, &file_s) != 0)
> > +    return true;
> > +
> > +  if (stat (to, &to_s) != 0)
> > +    return true;
>
> Have you considered requiring that both files be `regular', too?
> (i.e., you'd do use lstat for both above)
Good point. This option is definitely useful for regular files. I am not sure 
with symlinks. In the attached patch it works only for regular files, but no 
problem to extend it for symlinks if there is a good reason to do so.


Kamil

Attachment: 0001-install-add-compare-C-option-to-install-file-o.patch
Description: Text Data


reply via email to

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