bug#61767: install: options --compare (-C) and --preserve-timestamps are mutually exclusive

Pádraig Brady <[email protected]> Wed, 4 Mar 2026 12:14:14 +0000
Newsgroups gmane.comp.gnu.core-utils.bugs
Message-ID <[email protected]>
On 04/03/2026 04:53, Collin Funk wrote:
> Pádraig Brady <[email protected]> writes:
> 
>>> Here is a proposed patch that allows the options to be used
>>> together.
>>
>> It's best not to set timestamps in two places.
>> Could we adjust copy_file to return OK,FAIL,SKIP enum
>> and then adjust the conditionals in install_file_in_file() ?
>>
>> Also we could add a line to the test to be more robust:
>>
>>    echo a > a || framework_failure_
>>    echo a > b || framework_failure_
>>    touch -d 2026-01-01 a || framework_failure_
>>    test b -nt a || framework_failure_   # Handle systems with bad time
> 
> 
> Good ideas. I've attatched a v2 patch that makes those changes. Will
> push tomorrow.

The strip is now conditional on COPY_OK.
That would be a change in behavior.
A user might rerun install with -Csp to strip.

With that adjustment it looks good to push.

thanks!
Padraig