pkg-generic: fix fallout of <pkg>_STRIP_COMPONENTS introduction
authorThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Sun, 12 Jul 2015 11:35:55 +0000 (13:35 +0200)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Sun, 12 Jul 2015 11:35:55 +0000 (13:35 +0200)
The introduction of <pkg>_STRIP_COMPONENTS broke the build of the
target tar package, because support/dependencies/check-host-tar.mk
defines TAR_STRIP_COMPONENTS to --strip-components. Which leads to
have the package infrastructure do:

 $$(TAR_STRIP_COMPONENTS)=$$($(2)_STRIP_COMPONENTS)

which for the tar package evaluates to:

 $$(TAR_STRIP_COMPONENTS)=$$(TAR_STRIP_COMPONENTS)

which evalutes to:

 --strip-components=--strip-components

Which obviously doesn't work really well. And in fact the
TAR_STRIP_COMPONENTS definition in
support/dependencies/check-host-tar.mk is no longer necessary: it was
needed in the days where we were trying to support old tar versions
that did not support --strip-components. But nowadays, when such an
old tar version is encountered, we build our own host-tar which
supports --strip-components.

Fixes:

  http://autobuild.buildroot.org/results/ae2/ae20df67f99f75b1ba5d5b7316ad265d66f3aa66/

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
package/pkg-generic.mk
support/dependencies/check-host-tar.mk

index 700097598de3e10fb9feb7ccb14cae5ba20b0bd4..82376df0e0efb1e05ae1914ff9412742c7973bfd 100644 (file)
@@ -439,7 +439,7 @@ $(2)_TARGET_DIRCLEAN =              $$($(2)_DIR)/.stamp_dircleaned
 # default extract command
 $(2)_EXTRACT_CMDS ?= \
        $$(if $$($(2)_SOURCE),$$(INFLATE$$(suffix $$($(2)_SOURCE))) $$(DL_DIR)/$$($(2)_SOURCE) | \
-       $$(TAR) $$(TAR_STRIP_COMPONENTS)=$$($(2)_STRIP_COMPONENTS) -C $$($(2)_DIR) $$(TAR_OPTIONS) -)
+       $$(TAR) --strip-components=$$($(2)_STRIP_COMPONENTS) -C $$($(2)_DIR) $$(TAR_OPTIONS) -)
 
 # pre/post-steps hooks
 $(2)_PRE_DOWNLOAD_HOOKS         ?=
index 9729507110a3d7c2b2b2248e57e1669ecf864b48..9840a55e28bfeb9d53fd6022e16a3c070d105dc4 100644 (file)
@@ -4,6 +4,3 @@ ifeq (,$(call suitable-host-package,tar,$(TAR)))
 DEPENDENCIES_HOST_PREREQ += host-tar
 TAR = $(HOST_DIR)/usr/bin/tar
 endif
-
-# Since TAR is at least 1.17, it will certainly support --strip-components
-TAR_STRIP_COMPONENTS = --strip-components