diff mbox series

imagebuilder: fix build if the target is sourced from a feed

Message ID mailman.17760.1710861283.1280.openwrt-devel@lists.openwrt.org
State New
Headers show
Series imagebuilder: fix build if the target is sourced from a feed | expand

Commit Message

Thomas Richard via openwrt-devel March 19, 2024, 3:14 p.m. UTC
The sender domain has a DMARC Reject/Quarantine policy which disallows
sending mailing list messages using the original "From" header.

To mitigate this problem, the original message has been wrapped
automatically by the mailing list software.
From: Thomas Richard <thomas.richard@bootlin.com>

If a target is sourced from a feed, an error occurs during the build of
the imagebuilder. It fails to find the target directory.

To fix the issue, add a check to test if the target is in the feed
directory.

Signed-off-by: Thomas Richard <thomas.richard@bootlin.com>
---
 target/imagebuilder/Makefile | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/target/imagebuilder/Makefile b/target/imagebuilder/Makefile
index c3b6c9c10c..0fd830020c 100644
--- a/target/imagebuilder/Makefile
+++ b/target/imagebuilder/Makefile
@@ -80,7 +80,12 @@  endif
 
 	$(CP) -L $(TOPDIR)/target/linux/Makefile $(PKG_BUILD_DIR)/target/linux
 	$(CP) -L $(TOPDIR)/target/linux/generic $(PKG_BUILD_DIR)/target/linux
-	$(CP) -L $(TOPDIR)/target/linux/$(BOARD) $(PKG_BUILD_DIR)/target/linux
+	if [ -d $(TOPDIR)/target/linux/feeds/$(BOARD) ]; then \
+		$(INSTALL_DIR) $(PKG_BUILD_DIR)/target/linux/feeds; \
+		$(CP) -L $(TOPDIR)/target/linux/feeds/$(BOARD) $(PKG_BUILD_DIR)/target/linux/feeds/; \
+	else \
+		$(CP) -L $(TOPDIR)/target/linux/$(BOARD) $(PKG_BUILD_DIR)/target/linux; \
+	fi
 	if [ -d $(TOPDIR)/staging_dir/host/lib/grub ]; then \
 		$(CP) $(TOPDIR)/staging_dir/host/lib/grub/ $(PKG_BUILD_DIR)/staging_dir/host/lib; \
 	fi