Your message dated Sun, 03 Feb 2008 12:14:46 -0800
with message-id <[EMAIL PROTECTED]>
has caused the Debian Bug report #463251,
regarding tar: --transform does not apply to symlink targets when creating or 
listing
to be marked as having been forwarded to the upstream software
author(s) [EMAIL PROTECTED]

(NB: If you are a system administrator and have no idea what I am
talking about this indicates a serious mail system misconfiguration
somewhere.  Please contact me immediately.)

Debian bug tracking system administrator
(administrator, Debian Bugs database)

--- Begin Message ---
One of the users of my Debian tar packages reports that --transform only
works on symlinks during extraction, not on creation or listing.  A
quick review of the info doc didn't suggest any reason for that to be
intentional?

Bdale

--- Begin Message ---
Package: tar
Version: 1.19-1
Severity: normal

tar's --transform option seems to apply to symlink targets when
extracting an archive, but not when creating or listing one. (I
haven't checked other operations.)


# Create an archive with a symlink in

$ mkdir d
$ cd d
$ touch foo
$ ln -s foo bar
$ cd ..
$ ls -l d
total 0
lrwxrwxrwx 1 timb software 3 Jan 30 15:05 bar -> foo
-rw-rw-r-- 1 timb software 0 Jan 30 15:05 foo
$ tar cf d.tar d
$ tar tvf d.tar
drwxrwsr-x timb/software     0 2008-01-30 15:05 d/
-rw-rw-r-- timb/software     0 2008-01-30 15:05 d/foo
lrwxrwxrwx timb/software     0 2008-01-30 15:05 d/bar -> foo

# Listing with --transform doesn't transform the symlink target

$ tar tvf d.tar --transform=s/foo/quux/ --show-transformed-names
drwxrwsr-x timb/software     0 2008-01-30 15:05 d
-rw-rw-r-- timb/software     0 2008-01-30 15:05 d/quux
lrwxrwxrwx timb/software     0 2008-01-30 15:05 d/bar -> foo

# Extracting appears not to ...

$ rm -r d
$ tar xvvf d.tar --transform=s/foo/quux/ --show-transformed-names
drwxrwsr-x timb/software     0 2008-01-30 15:05 d
-rw-rw-r-- timb/software     0 2008-01-30 15:05 d/quux
lrwxrwxrwx timb/software     0 2008-01-30 15:05 d/bar -> foo

# ... but really does

$ ls -l d
total 0
lrwxrwxrwx 1 timb software 4 Jan 30 15:06 bar -> quux
-rw-rw-r-- 1 timb software 0 Jan 30 15:05 quux

# Restore the original and this time create with --transform

$ rm -r d
$ tar xf d.tar
$ ls -l d
total 0
lrwxrwxrwx 1 timb software 3 Jan 30 15:06 bar -> foo
-rw-rw-r-- 1 timb software 0 Jan 30 15:05 foo
$ tar cvvf d.tar d --transform=s/foo/quux/ --show-transformed-names
drwxrwsr-x timb/software     0 2008-01-30 15:05 d/
-rw-rw-r-- timb/software     0 2008-01-30 15:05 d/quux
lrwxrwxrwx timb/software     0 2008-01-30 15:06 d/bar -> foo

# This time it looks broken because it really is

$ tar tvf d.tar
drwxrwsr-x timb/software     0 2008-01-30 15:05 d/
-rw-rw-r-- timb/software     0 2008-01-30 15:05 d/quux
lrwxrwxrwx timb/software     0 2008-01-30 15:06 d/bar -> foo


-- System Information:
Debian Release: 4.0
  APT prefers stable
  APT policy: (990, 'stable'), (50, 'unstable'), (50, 'testing')
Architecture: amd64 (x86_64)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.22-3-amd64
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)

Versions of packages tar depends on:
ii  libc6                         2.7-6      GNU C Library: Shared libraries

tar recommends no packages.

-- no debconf information



--- End Message ---

--- End Message ---

Reply via email to