[Buildroot] [git commit] fs/tar: make --no-recursion effective

Peter Korsgaard peter at korsgaard.com
Wed Dec 28 09:13:21 UTC 2016

commit: https://git.buildroot.net/buildroot/commit/?id=d91ce1aa08016fa3fb186be9e6ef425dad6f050f
branch: https://git.buildroot.net/buildroot/commit/?id=refs/heads/master

The tar --no-recursion option is position sensitive. It only affects following
file listing options. Move --no-recursion before the -T option to make it
effective. This fixes duplication of entries in the generated rootfs.tar

Signed-off-by: Baruch Siach <baruch at tkos.co.il>
Signed-off-by: Peter Korsgaard <peter at korsgaard.com>
 fs/tar/tar.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/tar/tar.mk b/fs/tar/tar.mk
index b14c977..0e3eacb 100644
--- a/fs/tar/tar.mk
+++ b/fs/tar/tar.mk
@@ -8,7 +8,7 @@ TAR_OPTS := $(call qstrip,$(BR2_TARGET_ROOTFS_TAR_OPTIONS))
 	(cd $(TARGET_DIR); find -print0 | LC_ALL=C sort -z | \
-		tar $(TAR_OPTS) -cf $@ --null -T - --no-recursion --numeric-owner)
+		tar $(TAR_OPTS) -cf $@ --null --no-recursion -T - --numeric-owner)
 $(eval $(call ROOTFS_TARGET,tar))

More information about the buildroot mailing list