[openwrt/openwrt] build: fix host package unpack if git-src is used

LEDE Commits lede-commits at lists.infradead.org
Thu Nov 4 08:59:39 PDT 2021


nbd pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/9faa22fcee8f9bc5310239661838ab68c7e7c104

commit 9faa22fcee8f9bc5310239661838ab68c7e7c104
Author: Felix Fietkau <nbd at nbd.name>
AuthorDate: Thu Nov 4 15:54:27 2021 +0100

    build: fix host package unpack if git-src is used
    
    If the package download step is skipped, it needs to be performed for the host
    build instead.
    
    Signed-off-by: Felix Fietkau <nbd at nbd.name>
---
 include/host-build.mk | 2 +-
 include/package.mk    | 3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/include/host-build.mk b/include/host-build.mk
index cfa29419aa..b68c8c4536 100644
--- a/include/host-build.mk
+++ b/include/host-build.mk
@@ -205,5 +205,5 @@ endif
 
 define HostBuild
   $(HostBuild/Core)
-  $(if $(if $(PKG_HOST_ONLY),,$(STAMP_PREPARED)),,$(if $(strip $(PKG_SOURCE_URL)),$(call Download,default)))
+  $(if $(if $(PKG_HOST_ONLY),,$(if $(and $(filter host-%,$(MAKECMDGOALS)),$(PKG_SKIP_DOWNLOAD)),,$(STAMP_PREPARED))),,$(if $(strip $(PKG_SOURCE_URL)),$(call Download,default)))
 endef
diff --git a/include/package.mk b/include/package.mk
index 55d9352072..509ef61e08 100644
--- a/include/package.mk
+++ b/include/package.mk
@@ -13,6 +13,7 @@ PKG_INSTALL_DIR ?= $(PKG_BUILD_DIR)/ipkg-install
 PKG_BUILD_PARALLEL ?=
 PKG_USE_MIPS16 ?= 1
 PKG_IREMAP ?= 1
+PKG_SKIP_DOWNLOAD=$(USE_SOURCE_DIR)$(USE_GIT_TREE)$(USE_GIT_SRC_CHECKOUT)
 
 MAKE_J:=$(if $(MAKE_JOBSERVER),$(MAKE_JOBSERVER) $(if $(filter 3.% 4.0 4.1,$(MAKE_VERSION)),-j))
 
@@ -264,7 +265,7 @@ define Build/CoreTargets
 endef
 
 define Build/DefaultTargets
-  $(if $(USE_SOURCE_DIR)$(USE_GIT_TREE)$(USE_GIT_SRC_CHECKOUT),,$(if $(strip $(PKG_SOURCE_URL)),$(call Download,default)))
+  $(if $(PKG_SKIP_DOWNLOAD),,$(if $(strip $(PKG_SOURCE_URL)),$(call Download,default)))
   $(if $(DUMP),,$(Build/CoreTargets))
 
   define Build/DefaultTargets



More information about the lede-commits mailing list