[openwrt/openwrt] build: add support for git submodules with CONFIG_SRC_TREE_OVERRIDE
LEDE Commits
lede-commits at lists.infradead.org
Fri Apr 27 06:20:18 PDT 2018
nbd pushed a commit to openwrt/openwrt.git, branch master:
https://git.lede-project.org/6fa88be4868836e77b7472dcdde0aeb4f78f8203
commit 6fa88be4868836e77b7472dcdde0aeb4f78f8203
Author: Felix Fietkau <nbd at nbd.name>
AuthorDate: Wed Apr 25 11:52:20 2018 +0200
build: add support for git submodules with CONFIG_SRC_TREE_OVERRIDE
Also work around an issue where git would store the modified workdir in
the submodule git config files
Signed-off-by: Felix Fietkau <nbd at nbd.name>
---
include/package.mk | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/include/package.mk b/include/package.mk
index 78ea5d0..9912c86 100644
--- a/include/package.mk
+++ b/include/package.mk
@@ -120,7 +120,12 @@ ifdef USE_GIT_TREE
define Build/Prepare/Default
mkdir -p $(PKG_BUILD_DIR)
ln -s $(CURDIR)/git-src $(PKG_BUILD_DIR)/.git
- ( cd $(PKG_BUILD_DIR); git checkout .)
+ ( cd $(PKG_BUILD_DIR); \
+ git checkout .; \
+ git submodule update --recursive; \
+ git submodule foreach git config --unset core.worktree; \
+ git submodule foreach git checkout .; \
+ )
endef
endif
ifdef USE_SOURCE_DIR
More information about the lede-commits
mailing list