[OpenWrt-Devel] [PATCH] Fix build when TAR_OPTIONS env variable is set

Jan Kardell jan.kardell at telliq.com
Wed Sep 24 04:36:29 EDT 2014


The build system sets a make variable TAR_OPTIONS to the unpacking
command, i.e. "-xf -". Now if an environment variable with the same
name is set, the make variable is automatically exported to the
environment. The make variable is added to the tar command in the
makefile, and tar adds the environment variable. This results in a
command like "tar -c /some/dir -xf - -xf -" which of course doesn't
work. It is also difficult to spot as the second "-xf -" is not
visible on the command line.
I suggest this is fixed by unexporting TAR_OPTIONS as I see no use
of the evironment variable, and it is changed from the original
value anyway.

Signed-off-by: Jan Kardell <jan.kardell at telliq.com>
---
 rules.mk | 1 +
 1 file changed, 1 insertion(+)

diff --git a/rules.mk b/rules.mk
index c9efb9e..552c4c0 100644
--- a/rules.mk
+++ b/rules.mk
@@ -263,6 +263,7 @@ else
   DISABLE_IPV6:=--disable-ipv6
 endif
 
+unexport TAR_OPTIONS
 TAR_OPTIONS:=-xf -
 
 ifeq ($(CONFIG_BUILD_LOG),y)
-- 
1.8.4.5
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel



More information about the openwrt-devel mailing list