Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suppress GNU tar warnings about unknown keywords #508

Open
wants to merge 3 commits into
base: devel
Choose a base branch
from

Conversation

maxhq
Copy link

@maxhq maxhq commented Jul 26, 2016

If an archive is e.g. built on MacOS, usually additional informations are
included. When unpacking this using GNU tar there are messages like:

tar: Ignoring unknown extended header keyword `SCHILY.ino'
tar: Ignoring unknown extended header keyword `SCHILY.nlink'
tar: Ignoring unknown extended header keyword `SCHILY.dev'

To prevent this the option --warning=no-unknown-keyword was added if tar
is the GNU version (BSD tar does not support the option).

If an archive is e.g. built on MacOS, usually additional informations are
included. When unpacking this using GNU tar there are messages like:

    tar: Ignoring unknown extended header keyword `SCHILY.ino'
    tar: Ignoring unknown extended header keyword `SCHILY.nlink'
    tar: Ignoring unknown extended header keyword `SCHILY.dev'

To prevent this the option --warning=no-unknown-keyword was added if tar
is the GNU version (BSD tar does not support the option).
@skaji
Copy link
Contributor

skaji commented Jul 26, 2016

At least, tar (GNU tar) 1.15.1 does not support that option...

> docker run -i -t centos:centos5 bash -l
[root@c2755652684c /]# cat /etc/redhat-release
CentOS release 5.11 (Final)
[root@c2755652684c /]# tar --version
tar (GNU tar) 1.15.1
[root@c2755652684c /]# tar czf tmp.tar.gz tmp
[root@c2755652684c /]# ls -l tmp.tar.gz
-rw-r--r-- 1 root root 107 Jul 26 16:49 tmp.tar.gz
[root@c2755652684c /]# tar --warning=no-unknown-keyword -ztf tmp.tar.gz
tar: unrecognized option `--warning=no-unknown-keyword'
Try `tar --help' or `tar --usage' for more information.

@maxhq
Copy link
Author

maxhq commented Jul 26, 2016

Thanks skaji for pointing that out!
The option was added on 2009-08-05 and thus released with tar 1.23.
I added a check for tar version 1.23 or newer using the version module.

@maxhq
Copy link
Author

maxhq commented Jul 29, 2016

The TravisCI checks only fail for Perl 5.12 which seems quite strange to me. Could you please trigger a new check (can only be done with repo write access)?

@maxhq
Copy link
Author

maxhq commented Jul 31, 2016

Thank you, now they all pass ;-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants