package/pkg-utils.mk: rework implementation of extractor-system-dependency
authorThomas Petazzoni <thomas.petazzoni@bootlin.com>
Mon, 16 Dec 2019 15:31:15 +0000 (16:31 +0100)
committerYann E. MORIN <yann.morin.1998@free.fr>
Tue, 17 Dec 2019 21:09:48 +0000 (22:09 +0100)
Now that we have the EXTRACTOR_PKG_DEPENDENCY.* variables available,
we can use them to implement extractor-system-dependency: if for a
given archive type, the corresponding EXTRACTOR_PKG_DEPENDENCY.<type>
variable is empty, then it means we need the corresponding extractor
tool to be provided by the system.

Following this, EXTRACTOR_DEPENDENCY_PRECHECKED_EXTENSIONS is no
longer used, so we can drop it from support/dependencies/.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
package/pkg-utils.mk
support/dependencies/check-host-lzip.mk
support/dependencies/check-host-xzcat.mk

index 35a441e0aab19eb6c592dcdfac450168efd6f1c6..d324934dbad0b4bfcc0f545e7e1bd6f72af72cd6 100644 (file)
@@ -62,8 +62,8 @@ extractor-pkg-dependency = $(EXTRACTOR_PKG_DEPENDENCY$(suffix $(1)))
 # $(firstword) is used here because the extractor can have arguments,
 # like ZCAT="gzip -d -c", and to check for the dependency we only want
 # 'gzip'.
-extractor-system-dependency = $(firstword $(INFLATE$(filter-out \
-       $(EXTRACTOR_DEPENDENCY_PRECHECKED_EXTENSIONS),$(suffix $(1)))))
+extractor-system-dependency = $(if $(EXTRACTOR_PKG_DEPENDENCY$(suffix $(1))),,\
+       $(firstword $(INFLATE$(suffix $(1)))))
 
 # check-deprecated-variable -- throw an error on deprecated variables
 # example:
index cdd784058c8c9568a1cd490cb6d6a8b4f074ab8e..98a4f42388c10deffb59eb3753c35775d3554308 100644 (file)
@@ -1,5 +1,4 @@
 ifeq (,$(call suitable-host-package,lzip,$(LZCAT)))
 BR2_LZIP_HOST_DEPENDENCY = host-lzip
-EXTRACTOR_DEPENDENCY_PRECHECKED_EXTENSIONS += .lz
 LZCAT = $(HOST_DIR)/bin/lzip -d -c
 endif
index e5d72f95dde10edcf88c49bbf0a73c7001cf7188..9a78a8f38a0d2dfd4bce19f072a5927ed2167053 100644 (file)
@@ -3,6 +3,5 @@
 
 ifeq (,$(call suitable-host-package,xzcat,$(XZCAT)))
 BR2_XZCAT_HOST_DEPENDENCY = host-xz
-EXTRACTOR_DEPENDENCY_PRECHECKED_EXTENSIONS += .xz .lzma
 XZCAT = $(HOST_DIR)/bin/xzcat
 endif