emacs-bug-tracker
[Top][All Lists]
Advanced

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

[debbugs-tracker] bug#23285: closed (tar lacks a 'preserve symlinks on e


From: GNU bug Tracking System
Subject: [debbugs-tracker] bug#23285: closed (tar lacks a 'preserve symlinks on extract' option)
Date: Wed, 13 Apr 2016 21:05:03 +0000

Your message dated Wed, 13 Apr 2016 15:04:30 -0600
with message-id <address@hidden>
and subject line Re: bug#23285: tar lacks a 'preserve symlinks on extract' 
option
has caused the debbugs.gnu.org bug report #23285,
regarding tar lacks a 'preserve symlinks on extract' option
to be marked as done.

(If you believe you have received this mail in error, please contact
address@hidden)


-- 
23285: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=23285
GNU Bug Tracking System
Contact address@hidden with problems
--- Begin Message --- Subject: tar lacks a 'preserve symlinks on extract' option Date: Wed, 13 Apr 2016 21:58:56 +0100
There appears to be no way of telling tar
not to replace a destination symlink with a directory ,
in this scenario :

$ cd /tmp
$ mkdir d s t
$ ln -s ../t d/t
$ mkdir s/t
$ touch s/t/f
$ (cd s; tar -cpf - .) | (cd d; tar -xpf -)
$ ls -R d
  d:
t

d/t:
f

On extraction, tar has replaced the symlink d/t with a directory d/t .

I think there should be a way of getting tar to follow and preserve
such symlinks on extraction .

The manual page :
http://www.gnu.org/software/tar/manual/html_node/Dealing-with-Old-Files.html
states:
" When extracting files, if tar discovers that the extracted file
already exists, it
  normally replaces the file by removing it before extracting it, to
prevent confusi
 on in the presence of hard or symbolic links. (If the existing file
is a symbolic link,
 it is removed, not followed.)
" ...
"To be more aggressive about altering existing files, use the
`--overwrite' option.
 It causes tar to overwrite existing files and to follow existing
symbolic links when
 extracting.
"

But the --overwrite option does not prevent tar from removing symlinks in
the above scenario !

Morever, despite adding -v / --verbose, tar does not say anything about
removing such symlinks - I think it should.

Please, either make the --overwrite option follow & preserve symlinks
on extraction, or provide a --preserve-symlinks-on-extract option or
something
like it .
This problem prevents administrators from maintaining symlinks on systems
which might be updated with tar .

Is it likely that GNU tar will ever support this in future or or do I
have to develop
a patch to make it preserve symlinks on extraction  ?

Thanks & Regards,
Jason



--- End Message ---
--- Begin Message --- Subject: Re: bug#23285: tar lacks a 'preserve symlinks on extract' option Date: Wed, 13 Apr 2016 15:04:30 -0600 User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.7.1
tag 23285 notabug
thanks

On 04/13/2016 02:58 PM, Jason Vas Dias wrote:
> There appears to be no way of telling tar
> not to replace a destination symlink with a directory ,
> in this scenario :

Thanks for the report.  However, you've reached the coreutils list,
which does not include tar; and tar does not (yet?) use the
debbugs.gnu.org bug tracker, so we can't reassign your bug.  The best we
can do is close this bug (as it is not a coreutils problem) and tell you
to resend your mail to address@hidden, as directed by 'tar --help'.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


--- End Message ---

reply via email to

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