On 2016-07-13 10:18 -0700, Steve Langasek wrote:
> Investigating a failing autopkgtest failure of libgtkada in Ubuntu led me to
> the discovery that the 1.29-1 version of tar currently in testing and
> unstable does not appear to be handling --exclude options compatibly with
> previous versions. (Based on the disappearance of --exclude from the tar
> manpage, I assumed this meant the option had been dropped completely and was
> being silently ignored -- but I see it's still mentioned in the tar --help
> output and is present in the source.)
The Debian manpage for tar is very much broken, I have requested to
include the upstream manpage instead which is provided since tar 1.28
(see #827017).
> The problematic tar invocation is:
>
> tar --create --auto-compress --file=testgtk.tgz testgtk \
> --exclude=testgtk/README --exclude=testgtk/obj/* \
> --transform 's~^testgtk/opengl/view_gl\.ad~testgtk/view_gl.ad~' \
> --exclude=testgtk/test_rtree --exclude=testgtk/testgtk \
> --exclude=testgtk/testgtk.gpr debian/testgtk.gpr \
> --transform 's/^debian/testgtk/'
>
> Inspecting the resulting tarball shows that testgtk/README and testgtk/obj/*
> are present (and probably the others too, but I haven't looked).
>
> I've submitted a patch to libgtkada (bug #831001) to work around this, but
> it seems rather unexpected for tar's behavior to have changed here.
This has already been reported upstream[1], and their response was that
the --exclude option is position-sensitive[2]. This should certainly
have been mentioned in the NEWS file, but apparently it was regarded as
a bug fix[3].
FWIW, tar from git should report an error in these cases[4], but I
haven't tried it.
Cheers,
Sven
1. http://lists.gnu.org/archive/html/bug-tar/2016-05/msg00012.html
2. http://lists.gnu.org/archive/html/bug-tar/2016-05/msg00022.html
3.
http://git.savannah.gnu.org/cgit/tar.git/commit/?id=4cf2af45007b5288dae1037baffa681d37c0b1c2
4.
http://git.savannah.gnu.org/cgit/tar.git/commit/?id=9a33077a7b7ad7d32815a21dee54eba63b38a81c