Bug 11440 - cpio deletes symlinks
Summary: cpio deletes symlinks
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: cpio
Version: 6.2
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: bero
QA Contact:
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2000-05-16 10:13 UTC by Karsten Hopp
Modified: 2008-05-01 15:37 UTC (History)
0 users

(edit)
Clone Of:
(edit)
Last Closed: 2001-10-01 13:01:02 UTC


Attachments (Terms of Use)

Description Karsten Hopp 2000-05-16 10:13:11 UTC
I tried to transfer a cpio archive from on computer to the other.
Due to space limitations, the second machine had a symlink to
a directory on an other partition. This symlink was replaced by
a directory after unpacking the cpio archive.

Example:
On one computer you have the the following directory structure
which you want to cpoy to the other computer:

drwxr-xr-x    3 root     root         2048 May  5 16:03 ./
drwxrwxrwt    9 root     root        11264 May  5 16:03 ../
drwxr-xr-x    2 root     root         3072 May  5 15:39 test/
drwxr-xr-x    1 root     root         3072 May  5 15:39 test1/

Then create the archive with cpio -oc.

On the other maschine are the following files:
drwxr-xr-x    3 root     root         2048 Apr  5 16:03 ./
drwxrwxrwt    9 root     root        11264 Apr  5 16:03 ../
drwxr-xr-x    2 root     root         3072 Apr  5 15:39 test/
lrwxrwxrwx    1 root     root            4 Apr  5 15:39 test1->/mnt/other/

Unpack the archive  with cpio -ivu or cpio -ivumd.


ls -l:
drwxr-xr-x    3 root     root         2048 May  5 16:03 ./
drwxrwxrwt    9 root     root        11264 May  5 16:03 ../
drwxr-xr-x    2 root     root         3072 May  5 15:39 test/
drwxr-xr-x    1 root     root         3072 May  5 15:39 test1/

I don't think that this is the expected behavior.

Comment 1 Jeff Johnson 2000-07-22 18:36:45 UTC
Verified that solaris2.6 /bin/cpio does not replace symlink with directory.

Comment 2 Jeff Johnson 2000-08-08 16:06:45 UTC
Deferred until after Red Hat 7.0.

Comment 3 Karsten Hopp 2001-02-09 16:55:38 UTC
seems to be an glibc problem. Update to glibc-2.2.1-6, and the link wont be 
replaced.


Note You need to log in before you can comment on or make changes to this bug.