From 3810219441350c68f21a5d3788c9c1c3eb5c6be0 Mon Sep 17 00:00:00 2001 From: Christian Marangi Date: Wed, 12 Jun 2024 15:55:17 +0200 Subject: [PATCH] toplevel.mk: make sure tmp exist for .packagedynamicdefault With some big corner case, tmp directory might not exist when check-dynamic-def-pkg is called. To handle this, make sure tmp exist before creating the .packagedynamicdefault file. Fixes: 9a52ec4fa092 ("toplevel.mk: implement logic to invalidate targetinfo with some config") Signed-off-by: Christian Marangi --- include/toplevel.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/toplevel.mk b/include/toplevel.mk index f711a30614..54cd8e3a90 100644 --- a/include/toplevel.mk +++ b/include/toplevel.mk @@ -88,7 +88,7 @@ check-dynamic-def-pkg: FORCE fi; \ [ ! -f tmp/.packagedynamicdefault ] || OLD_DEF_PKG_CONFS=$$(cat tmp/.packagedynamicdefault); \ [ "$$DEF_PKG_CONFS" = "$$OLD_DEF_PKG_CONFS" ] || rm -rf tmp/info/.targetinfo*; \ - echo "$$DEF_PKG_CONFS" > tmp/.packagedynamicdefault; + mkdir -p tmp && echo "$$DEF_PKG_CONFS" > tmp/.packagedynamicdefault; prepare-tmpinfo: check-dynamic-def-pkg FORCE @+$(MAKE) -r -s $(STAGING_DIR_HOST)/.prereq-build $(PREP_MK) -- 2.30.2