fs/tar: support passing long options to tar
authorFrank Hunleth <fhunleth@troodon-software.com>
Fri, 24 Jun 2016 15:57:56 +0000 (11:57 -0400)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Sat, 25 Jun 2016 13:42:44 +0000 (15:42 +0200)
Move TAR_OPTS so that long options (or any option with an initial '-')
may be passed to tar. Since TAR_OPTS is at the front of the list, single
letter options still work.

Signed-off-by: Frank Hunleth <fhunleth@troodon-software.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
fs/tar/tar.mk

index 28219cf05277e59f2678c312bad70701b8306d67..11c69c5a8baca725af1625e5fedea11f933118d0 100644 (file)
@@ -7,7 +7,7 @@
 TAR_OPTS := $(call qstrip,$(BR2_TARGET_ROOTFS_TAR_OPTIONS))
 
 define ROOTFS_TAR_CMD
-       tar -c$(TAR_OPTS)f $@ --numeric-owner -C $(TARGET_DIR) .
+       tar $(TAR_OPTS) -cf $@ --numeric-owner -C $(TARGET_DIR) .
 endef
 
 $(eval $(call ROOTFS_TARGET,tar))