Subject: bug#8374: closed (Re: bug#8374: cp -a [-l] sometimes does not preserve timestamps of symlinks)

From: [email-masked] (GNU bug Tracking System)
Date: Fri, 01 Apr 2011 13:57:02 +0000

Your bug report

#8374: cp -a [-l] sometimes does not preserve timestamps of symlinks

which was filed against the coreutils package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
8374: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=8374
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#8374: cp -a [-l] sometimes does not preserve timestamps of symlinks
From: Pádraig Brady <[email-masked]>
Cc: [email-masked]
Date: Fri, 01 Apr 2011 14:55:22 +0100
List-Id: <debbugs-submit.debbugs.gnu.org>

On 01/04/11 13:21, Jim Meyering wrote:
>> * src/copy.c (copy_internal): Use our existing hardlink to
>> symlink emulation when we're not sure that link() will
>> not dereference the symlink.  Also ensure that we copy the
> 
> How about "...when link() might dereference..."

Much clearer thanks.

I've pushed that.

Subject: cp -a [-l] sometimes does not preserve timestamps of symlinks
From: Ruediger Meier <[email-masked]>
To: [email-masked]
Date: Tue, 29 Mar 2011 15:46:07 +0200
List-Id: <debbugs-submit.debbugs.gnu.org>

Hi,

I see you fixed that already for for cp -a
http://marc.info/?t=124897089600001&r=1&w=2

But it does not together with option -link:

cd /tmp/
ln -s somewhere symlink
touch -h -t "197001010000"  symlink
cp -a symlink symlink-a
cp -al symlink symlink-al
ls -l symlink*
lrwxrwxrwx 1 rudi users 9 1970-01-01 00:00 symlink -> somewhere
lrwxrwxrwx 1 rudi users 9 1970-01-01 00:00 symlink-a -> somewhere
lrwxrwxrwx 1 rudi users 9 2011-03-29 13:44 symlink-al -> somewhere

I'm using core utils coreutils 8.9 (opensuse 11.4).

BTW with coreutils 7.1 and 6.9 it behaves the other way, -al is correct 
but -a not.

So probably -al is broken since you fixed -a in 7.5.

cu,
Rudi