1 |
As reported in bug 572578, the gentoo rsync repository contains a file |
2 |
which intentionally has a future timestamp. Since tar future timestamp |
3 |
warnings are irrelevant, suppress them if tar supports the option. |
4 |
|
5 |
X-Gentoo-Bug: 572578 |
6 |
X-Gentoo-Bug-url: https://bugs.gentoo.org/show_bug.cgi?id=572578 |
7 |
--- |
8 |
bin/emerge-webrsync | 7 +++++-- |
9 |
1 file changed, 5 insertions(+), 2 deletions(-) |
10 |
|
11 |
diff --git a/bin/emerge-webrsync b/bin/emerge-webrsync |
12 |
index 9961ad8..ee0d980 100755 |
13 |
--- a/bin/emerge-webrsync |
14 |
+++ b/bin/emerge-webrsync |
15 |
@@ -66,6 +66,9 @@ fi |
16 |
do_verbose=0 |
17 |
do_debug=0 |
18 |
keep=false |
19 |
+tar_opts=() |
20 |
+ |
21 |
+[[ $(tar --help) == *--warning* ]] && tar_opts+=(--warning=no-timestamp) |
22 |
|
23 |
if has webrsync-gpg ${FEATURES} ; then |
24 |
WEBSYNC_VERIFY_SIGNATURE=1 |
25 |
@@ -86,7 +89,7 @@ do_tar() { |
26 |
*.gz) decompressor="zcat" ;; |
27 |
*) decompressor="cat" ;; |
28 |
esac |
29 |
- ${decompressor} "${file}" | tar "$@" |
30 |
+ ${decompressor} "${file}" | tar "${tar_opts[@]}" "$@" |
31 |
_pipestatus=${PIPESTATUS[*]} |
32 |
[[ ${_pipestatus// /} -eq 0 ]] |
33 |
} |
34 |
@@ -225,7 +228,7 @@ sync_local() { |
35 |
return 1 |
36 |
fi |
37 |
else |
38 |
- if ! do_tar "${file}" xf -; then |
39 |
+ if ! do_tar "${file}" -xf -; then |
40 |
eecho "tar failed to extract the image. tarball is corrupt? (${file})" |
41 |
rm -fr portage |
42 |
return 1 |
43 |
-- |
44 |
2.4.10 |