[openwrt/openwrt] host-build: fix stampfile name substitution per installed binaries
LEDE Commits
lede-commits at lists.infradead.org
Thu Apr 25 14:10:24 PDT 2024
robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/5a028a8d737b669d0d30d1ef93981e10f585a0e7
commit 5a028a8d737b669d0d30d1ef93981e10f585a0e7
Author: Michael Pratt <mcpratt at pm.me>
AuthorDate: Thu Apr 4 02:11:28 2024 -0400
host-build: fix stampfile name substitution per installed binaries
A funny bug was discovered where if the buildroot's path
has the name of the build target within it, it will also be substituted
along with the stampfile's name for each program,
causing an attempt to touch a file in a directory that doesn't exist.
...
...
touch: cannot touch '/Volumes/touch/openwrt/staging_dir/host/stamp/.touch_installed': No such file or directory
touch: cannot touch '/Volumes/ln/openwrt/staging_dir/host/stamp/.ln_installed': No such file or directory
touch: cannot touch '/Volumes/chown/openwrt/staging_dir/host/stamp/.chown_installed': No such file or directory
make[2]: *** [Makefile:50: /Volumes/coreutils/openwrt/staging_dir/host/stamp/.coreutils_installed] Error 1
...
...
Split up the path with $(dir) and $(notdir) before substitution to fix
the syntax.
Reported-by: Georgi Valkov <gvalkov at gmail.com>
Tested-by: Georgi Valkov <gvalkov at gmail.com> # MacOS
Signed-off-by: Michael Pratt <mcpratt at pm.me>
Signed-off-by: Tony Ambardar <itugrok at yahoo.com>
---
include/host-build.mk | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/host-build.mk b/include/host-build.mk
index dba6b819da..819fff5664 100644
--- a/include/host-build.mk
+++ b/include/host-build.mk
@@ -26,7 +26,7 @@ HOST_STAMP_CONFIGURED:=$(HOST_BUILD_DIR)/.configured
HOST_STAMP_BUILT:=$(HOST_BUILD_DIR)/.built
HOST_BUILD_PREFIX?=$(if $(IS_PACKAGE_BUILD),$(STAGING_DIR_HOSTPKG),$(STAGING_DIR_HOST))
HOST_STAMP_INSTALLED:=$(HOST_BUILD_PREFIX)/stamp/.$(PKG_NAME)_installed
-HOST_STAMP_PROGRAMS:=$(foreach program,$(PKG_PROGRAMS),$(subst $(PKG_NAME),$(program),$(HOST_STAMP_INSTALLED)) )
+HOST_STAMP_PROGRAMS:=$(foreach program,$(PKG_PROGRAMS),$(dir $(HOST_STAMP_INSTALLED))$(subst $(PKG_NAME),$(program),$(notdir $(HOST_STAMP_INSTALLED))) )
override MAKEFLAGS=
More information about the lede-commits
mailing list