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,