aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2012-08-01 16:42:51 -0400
committerEelco Dolstra <eelco.dolstra@logicblox.com>2012-08-01 16:42:51 -0400
commit46f852cda013b818f113c7905f020131a44f2340 (patch)
treeb0a7b33f8b3c370a18da777a189a7de010b16055
parentafa7e0187815d89c8af93fa9c1081bf67ab0f10e (diff)
Use a GNU tar flag to shut up warnings about implausibly old timestamp
-rw-r--r--configure.ac12
-rw-r--r--corepkgs/config.nix.in1
-rw-r--r--corepkgs/unpack-channel.nix2
-rw-r--r--substitute.mk1
4 files changed, 15 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index 21a87194f..bbee7b061 100644
--- a/configure.ac
+++ b/configure.ac
@@ -339,6 +339,18 @@ eval dynlib_suffix=$shrext_cmds
AC_SUBST(dynlib_suffix)
+# Do we have GNU tar?
+AC_MSG_CHECKING([if you have GNU tar])
+if $tar --version 2> /dev/null | grep -q GNU; then
+ AC_MSG_RESULT(yes)
+ tarFlags="--warning=no-timestamp"
+else
+ AC_MSG_RESULT(no)
+fi
+AC_SUBST(tarFlags)
+
+
+
AM_CONFIG_HEADER([config.h])
AC_CONFIG_FILES([Makefile
src/Makefile
diff --git a/corepkgs/config.nix.in b/corepkgs/config.nix.in
index 26e821d0e..6f6ec6de1 100644
--- a/corepkgs/config.nix.in
+++ b/corepkgs/config.nix.in
@@ -9,6 +9,7 @@ in {
bzip2 = "@bzip2@";
xz = "@xz@";
tar = "@tar@";
+ tarFlags = "@tarFlags@";
tr = "@tr@";
curl = "@curl@";
nixBinDir = fromEnv "NIX_BIN_DIR" "@bindir@";
diff --git a/corepkgs/unpack-channel.nix b/corepkgs/unpack-channel.nix
index b26bece30..bbc54c7d1 100644
--- a/corepkgs/unpack-channel.nix
+++ b/corepkgs/unpack-channel.nix
@@ -6,7 +6,7 @@ let
''
mkdir $out
cd $out
- ${bzip2} -d < $src | ${tar} xf -
+ ${bzip2} -d < $src | ${tar} xf - --warning=no-timestamp
mv * $out/$channelName
'';
diff --git a/substitute.mk b/substitute.mk
index 77c5afc28..378751943 100644
--- a/substitute.mk
+++ b/substitute.mk
@@ -22,6 +22,7 @@
-e "s^@coreutils\@^$(coreutils)^g" \
-e "s^@sed\@^$(sed)^g" \
-e "s^@tar\@^$(tar)^g" \
+ -e "s^@tarFlags\@^$(tarFlags)^g" \
-e "s^@gzip\@^$(gzip)^g" \
-e "s^@pv\@^$(pv)^g" \
-e "s^@tr\@^$(tr)^g" \