Improve tar check if bsdtar is installed
PATCH 1/1 Improve tar check if bsdtar is installed
If bsdtar is installed, fix script error for tar version detection. Set tar version to 'invalid' to trigger rebuild of 'host-tar'.
--- support/dependencies/check-host-tar.sh | 8 ++++++++ 1 file changed, 8 insertions(+)
support/dependencies/check-host-tar.sh +8 -0
@@ -14,10 +14,18 @@ fi # Output of 'tar --version' examples: # tar (GNU tar) 1.15.1 # tar (GNU tar) 1.25 +# bsdtar 2.8.3 - libarchive 2.8.3 version=`$tar --version | head -n 1 | sed 's/^.*\s\([0-9]\+\.\S\+\).*$/\1/'` major=`echo "$version" | cut -d. -f1` minor=`echo "$version" | cut -d. -f2` bugfix=`echo "$version" | cut -d. -f3` +version_bsd=`$tar --version | grep 'bsdtar'` +if [ ! -z "${version_bsd}" ] ; then + # mark as invalid tar version + major=1 + minor=14 + bugfix=1 +fi # Minimal version = 1.17 (previous versions do not correctly unpack archives # containing hard-links if the --strip-components option is used).
Signature · 1 line
1.8.5.2 (Apple Git-48)
PATCH 1/1 Improve tar check if bsdtar is installed
Heiko, All,
On 2014-05-30 17:44 +0200, Heiko Abraham spake thusly:
Quoted 11 lines
If bsdtar is installed, fix script error for tar version detection. Set tar version to 'invalid' to trigger rebuild of 'host-tar'.
--- support/dependencies/check-host-tar.sh | 8 ++++++++ 1 file changed, 8 insertions(+)support/dependencies/check-host-tar.sh +0
-0
support/dependencies/check-host-tar.sh fi · line 23
Quoted 10 lines
support/dependencies/check-host-tar.sh +3
-0@@ -14,10 +14,18 @@ fi # Output of 'tar --version' examples: # tar (GNU tar) 1.15.1 # tar (GNU tar) 1.25 +# bsdtar 2.8.3 - libarchive 2.8.3 version=`$tar --version | head -n 1 | sed 's/^.*\s\([0-9]\+\.\S\+\).*$/\1/'` major=`echo "$version" | cut -d. -f1` minor=`echo "$version" | cut -d. -f2` bugfix=`echo "$version" | cut -d. -f3` +version_bsd=`$tar --version | grep 'bsdtar'` +if [ ! -z "${version_bsd}" ] ; then
if [ -n "${version_bsd}" ]; then
support/dependencies/check-host-tar.sh fi · line 27
Quoted 4 lines
support/dependencies/check-host-tar.sh +4
-0+ # mark as invalid tar version + major=1 + minor=14 + bugfix=1
Any reason you used 1.14.1? To be obvious that this is an invalid version, I'd have set it to something like:
major=0
minor=0Alternatively, since our minimal supported version is 1.17, I'd have used something like:
major=1
minor=16And, no need to set bugfix, it;s not used in the check.
Regards,
Yann E. MORIN.
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------'
PATCH 1/1 Improve tar check if bsdtar is installed
Dear Yann,
Am 30.05.2014 um 19:16 schrieb Yann E. MORIN <[email protected]>:
Quoted 8 lines
On 2014-05-30 17:44 +0200, Heiko Abraham spake thusly:
Quoted 1 line
...
if [ -n "${version_bsd}" ]; then
support/dependencies/check-host-tar.sh fi · line 27
Quoted 4 lines
support/dependencies/check-host-tar.sh +4
-0+ # mark as invalid tar version + major=1 + minor=14 + bugfix=1
Quoted 4 lines
Any reason you used 1.14.1? To be obvious that this is an invalid version, I'd have set it to something like:
major=0 minor=0
yes, we can should version 1.16.0 instead version 1.14.1. This may be better. With this suggestion I will prepare a new patch.
Thanks,
Heiko
PATCH 1/1 Improve tar check if bsdtar is installed
Heiko, All,
On 2014-05-30 19:40 +0200, Heiko Abraham spake thusly:
Quoted 9 lines
Am 30.05.2014 um 19:16 schrieb Yann E. MORIN <[email protected]>:
Quoted 8 lines
On 2014-05-30 17:44 +0200, Heiko Abraham spake thusly:
Quoted 1 line
...
if [ -n "${version_bsd}" ]; then
Quoted 4 lines
support/dependencies/check-host-tar.sh +4
-0+ # mark as invalid tar version + major=1 + minor=14 + bugfix=1
Quoted 7 lines
Quoted 4 lines
Any reason you used 1.14.1? To be obvious that this is an invalid version, I'd have set it to something like:
major=0 minor=0yes, we can should version 1.16.0 instead version 1.14.1. This may be better. With this suggestion I will prepare a new patch.
I think using 0.0 is even better: it is clearly an invalid version.
Regards,
Yann E. MORIN.
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------'
PATCH 1/1 Improve tar check if bsdtar is installed
In reply to Heiko AbrahamHeiko Abraham <[email protected]> schreef:
Quoted 19 lines
If bsdtar is installed, fix script error for tar version detection. Set tar version to 'invalid' to trigger rebuild of 'host-tar'.
---support/dependencies/check-host-tar.sh| 8 ++++++++1 file changed, 8 insertions(+)support/dependencies/check-host-tar.sh +1
-0@@ -14,10 +14,18 @@ fi # Output of 'tar --version' examples: # tar (GNU tar) 1.15.1 # tar (GNU tar) 1.25 +# bsdtar 2.8.3 - libarchive 2.8.3version=
$tar --version | head -n 1 | sed 's/^.*\s\([0-9]\+\.\S\+\).*$/\1/'major=echo "$version" | cut -d. -f1
minor=echo "$version" | cut -d. -f2
bugfix=echo "$version" | cut -d. -f3
support/dependencies/check-host-tar.sh fi · line 28
Quoted 7 lines
support/dependencies/check-host-tar.sh +7
-0+version_bsd=`$tar --version | grep 'bsdtar'` +if [ ! -z "${version_bsd}" ] ; then + # mark as invalid tar version + major=1 + minor=14 + bugfix=1 +fi
Could you clarify what the problem is with bsdtar and add this as a comment in the patch?
Also, the magic 1.14.1 is pretty odd, you could just as well take 0.0.0
Best regards,
Thomas
PATCH v2 1/1 Improve tar check if bsdtar is installed
In reply to Heiko AbrahamIf bsdtar is installed, fix script error for tar version detection.
bsdtar not provide all expected command line (long) options like "--hard-dereference". To ensure compatibly mark version of tar as 'invalid' and trigger rebuild of 'host-tar'.
--- support/dependencies/check-host-tar.sh | 7 +++++++ 1 file changed, 7 insertions(+)
support/dependencies/check-host-tar.sh +7 -0
@@ -14,10 +14,17 @@ fi # Output of 'tar --version' examples: # tar (GNU tar) 1.15.1 # tar (GNU tar) 1.25 +# bsdtar 2.8.3 - libarchive 2.8.3 version=`$tar --version | head -n 1 | sed 's/^.*\s\([0-9]\+\.\S\+\).*$/\1/'` major=`echo "$version" | cut -d. -f1` minor=`echo "$version" | cut -d. -f2` bugfix=`echo "$version" | cut -d. -f3` +version_bsd=`$tar --version | grep 'bsdtar'` +if [ ! -z "${version_bsd}" ] ; then + # mark as invalid version - not all command line options are available + major=0 + minor=0 +fi # Minimal version = 1.17 (previous versions do not correctly unpack archives # containing hard-links if the --strip-components option is used).
Signature · 1 line
1.8.5.2 (Apple Git-48)
PATCH v2 1/1 Improve tar check if bsdtar is installed
Heiko, All,
On 2014-05-31 00:10 +0200, Heiko Abraham spake thusly:
Quoted 3 lines
If bsdtar is installed, fix script error for tar version detection.
bsdtar not provide all expected command line (long) options
bsdtar _does_ not provide [...]
Quoted 4 lines
like "--hard-dereference". To ensure compatibly mark version of tar as 'invalid' and trigger rebuild of 'host-tar'.
Signed-off-by Heiko Abraham <[email protected]>
Except for the minor nit in the commit log, which can be fixed by Peter when he commits:
Regards,
Yann E. MORIN.
Quoted 29 lines
--- support/dependencies/check-host-tar.sh | 7 +++++++ 1 file changed, 7 insertions(+)support/dependencies/check-host-tar.sh +7
-0@@ -14,10 +14,17 @@ fi # Output of 'tar --version' examples: # tar (GNU tar) 1.15.1 # tar (GNU tar) 1.25 +# bsdtar 2.8.3 - libarchive 2.8.3 version=`$tar --version | head -n 1 | sed 's/^.*\s\([0-9]\+\.\S\+\).*$/\1/'` major=`echo "$version" | cut -d. -f1` minor=`echo "$version" | cut -d. -f2` bugfix=`echo "$version" | cut -d. -f3` +version_bsd=`$tar --version | grep 'bsdtar'` +if [ ! -z "${version_bsd}" ] ; then + # mark as invalid version - not all command line options are available + major=0 + minor=0 +fi # Minimal version = 1.17 (previous versions do not correctly unpack archives # containing hard-links if the --strip-components option is used).Signature · 1 line
1.8.5.2 (Apple Git-48)
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------'
PATCH v2 1/1 Improve tar check if bsdtar is installed
In reply to Heiko AbrahamQuoted 8 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Heiko" == Heiko Abraham <[email protected]> writes:
If bsdtar is installed, fix script error for tar version detection. bsdtar not provide all expected command line (long) options like "--hard-dereference". To ensure compatibly mark version of tar as 'invalid' and trigger rebuild of 'host-tar'.
Signed-off-by Heiko Abraham <[email protected]>
Committed to next, thanks.
Signature · 1 line
Bye, Peter Korsgaard