diff options
author | Pádraig Brady <P@draigBrady.com> | 2022-04-09 12:42:37 +0100 |
---|---|---|
committer | Pádraig Brady <P@draigBrady.com> | 2022-04-09 13:00:52 +0100 |
commit | 54bec51754c963562378c85b0e1561b84c326785 (patch) | |
tree | a1167d89619eefd6a0508ff5822b0887101e828b | |
parent | d28e369960107696107d888c252abfdd6facd749 (diff) | |
download | coreutils-54bec51754c963562378c85b0e1561b84c326785.tar.gz |
doc: install --compare: clarify mode of operation
* doc/coreutils.texi (install invocation): For the --compare option,
clarify that the ownership or permissions of the source files don't
matter. Also don't imply --owner or --group need to be specified
for --compare to be effective.
* src/install.c (usage): Add more detail on what's being compared.
Fixes https://bugs.gnu.org/50889
-rw-r--r-- | doc/coreutils.texi | 4 | ||||
-rw-r--r-- | src/install.c | 5 |
2 files changed, 5 insertions, 4 deletions
diff --git a/doc/coreutils.texi b/doc/coreutils.texi index c9243c683..8cfa698a1 100644 --- a/doc/coreutils.texi +++ b/doc/coreutils.texi @@ -9796,8 +9796,8 @@ The program accepts the following options. Also see @ref{Common options}. @itemx --compare @opindex -C @opindex --compare -Compare each pair of source and destination files, and if the destination has -identical content and any specified owner, group, permissions, and possibly +Compare content of source and destination files, and if there would be no +change to the destination content, owner, group, permissions, and possibly SELinux context, then do not modify the destination at all. Note this option is best used in conjunction with @option{--user}, @option{--group} and @option{--mode} options, lest @command{install} diff --git a/src/install.c b/src/install.c index 57a877f4a..079ce1f70 100644 --- a/src/install.c +++ b/src/install.c @@ -592,8 +592,9 @@ In the 4th form, create all components of the given DIRECTORY(ies).\n\ --backup[=CONTROL] make a backup of each existing destination file\n\ -b like --backup but does not accept an argument\n\ -c (ignored)\n\ - -C, --compare compare each pair of source and destination files, and\n\ - in some cases, do not modify the destination at all\n\ + -C, --compare compare content of source and destination files, and\n\ + if no change to content, ownership, and permissions,\n\ + do not modify the destination at all\n\ -d, --directory treat all arguments as directory names; create all\n\ components of the specified directories\n\ "), stdout); |