Skip Menu |

This queue is for tickets about the Archive-Tar CPAN distribution.

Report information
The Basics
Id: 33669
Status: resolved
Priority: 0/
Queue: Archive-Tar

People
Owner: Nobody in particular
Requestors: keith.chapman [...] lmco.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: Could not update timestamp warning on symlinks
Date: Thu, 28 Feb 2008 13:47:34 -0500
To: bug-archive-tar [...] rt.cpan.org
From: "Chapman, Keith" <keith.chapman [...] lmco.com>
TWIMC, I may misunderstand the expected behavior of tar (if so, you can just say that and not have to explain), but it appears that Archive::Tar::_extract_file (on line 675 in version 1.38) attempts to update the timestamps on the extracted file even if it is a symlink. On Solaris (at least), this always results in an attempt to modify the timestamp of the target of the link, which I don't believe is correct behavior. In my case, I get warnings because the symlinks point to files that have read-only permissions. GNU tar 1.15.1 does not seem to give these same warnings, but I don't know if that's because it's not attempting to change the timestamps or it's just not mentioning the failure. If you agree, a fix may be to wrap lines 675-676 with an "if" like that on line 685: if ( not -l $full ) { utime time, $entry->mtime - TIME_OFFSET, $full or $self->_error( ... ); } This may have to be refined to only act this way on Unix platforms; I don't know anything about the behavior of symlinks on other platforms. Even if you don't agree, please consider adding the name of the file in question to the error message (that seems to be the only error condition in that subroutine that doesn't mention the file that's having a problem). For reference, my operating environment is: OS: Unix uname -a output: SunOS itlccdevsvr2 5.10 Generic_120011-14 sun4u sparc SUNW,Sun-Fire-280R perl -v output: This is perl, v5.8.7 built for sun4-solaris Thanks for your attention, --keith
On Thu Feb 28 13:48:26 2008, keith.chapman@lmco.com wrote: [...] Show quoted text
> this always results in an attempt to modify the > timestamp of the target of the link, which I don't believe is correct > behavior. In my case, I get warnings because the symlinks point to > files that have read-only permissions.
Thanks for your report; somehow this one fell between the cracks. Your observation is correct and we probably shouldn't be updating timestamps as they update the target, not the link. The update is now wrapped in a conditional that skips links. Cheers,