Package: tar
Version: 1.27.1-2+b1
Severity: normal
Tags: upstream

Dear Maintainer,

I noticed a major change in behavior between Wheezy (GNU tar 1.26) and
Jessie (GNU tar 1.27.1), using the --keep-old-files option.

On the previous version, where --skip-old-files is *not* available,
--keep-old-files silently ignores existing files (behavior of current
--skip-old-files).

On the current version, --keep-old-files reports errors for existing
files and returns with an error status (2) if exiting files are
encountered.

I'm all for adding new features, but it seems that my only possible
workaround is to detect whether --skip-old-files is available, so I can
choose which option does what I need (and that need is very basic).

This script should highlight the difference in behavior:

    cd
    touch a b
    tar cf t.tar.gz a b
    rm b
    tar xf t.tar.gz --keep-old-files a b; echo $?
    # fails with "a: Cannot open: File exists", 2 on Jessie
    # succeeds on Wheezy
    rm -f b
    tar xf t.tar.gz --skip-old-files a b; echo $?
    # succeeds on Jessie
    # fails with "unrecognized option '--skip-old-files'", 64 on Wheezy
    rm -f t.tar.gz a b

Seems to affect Ubuntu as well (difference between 12.04 and 14.04,
same GNU tar versions).

Of course, if I somehow missed the obvious way to get the behavior I
need, don't hesitate to correct me.

Best regards,

-- System Information:
Debian Release: 8.0
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 3.16.0-4-amd64 (SMP w/8 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages tar depends on:
ii  libacl1      2.2.52-2
ii  libc6        2.19-18
ii  libselinux1  2.3-2

tar recommends no packages.

Versions of packages tar suggests:
ii  bzip2        1.0.6-7+b3
pn  ncompress    <none>
pn  tar-scripts  <none>
ii  xz-utils     5.1.1alpha+20120614-2+b3

-- no debconf information


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to