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: 9a52ec4fa0 ("toplevel.mk: implement logic to invalidate targetinfo with some config")
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
This commit is contained in:
Christian Marangi 2024-06-12 15:55:17 +02:00
parent 95597dc2e3
commit 3810219441
No known key found for this signature in database
GPG Key ID: AC001D09ADBFEAD7

View File

@ -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)