From: Christian Marangi Date: Wed, 12 Jun 2024 13:55:17 +0000 (+0200) Subject: toplevel.mk: make sure tmp exist for .packagedynamicdefault X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=3810219441350c68f21a5d3788c9c1c3eb5c6be0;p=openwrt%2Fstaging%2Fnbd.git 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 --- 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)