build: fix missing PKG_INFO_DIR

If the first built package has an ABI, PKG_INFO_DIR might not exist, so
ensure it does.

Signed-off-by: George Sapkin <george@sapk.in>
Link: https://github.com/openwrt/openwrt/pull/21265
(cherry picked from commit 56bc4a0d894f18933c6de2b65a042d4f34f50cd9)
Link: https://github.com/openwrt/openwrt/pull/21253
Signed-off-by: Robert Marko <robimarko@gmail.com>
This commit is contained in:
George Sapkin 2025-12-24 04:28:49 +02:00 committed by Robert Marko
parent e0ea3d73d2
commit eaeae068cc

View File

@ -191,6 +191,7 @@ endif
$(STAGING_DIR_ROOT)/stamp/.$(1)_installed: $(PKG_BUILD_DIR)/.pkgdir/$(1).installed
mkdir -p $(STAGING_DIR_ROOT)/stamp
$(if $(ABI_VERSION),echo '$(ABI_VERSION)' | cmp -s - $(PKG_INFO_DIR)/$(1).version || { \
mkdir -p $(PKG_INFO_DIR); \
echo '$(ABI_VERSION)' > $(PKG_INFO_DIR)/$(1).version; \
$(foreach pkg,$(filter-out $(1),$(PROVIDES)), \
cp $(PKG_INFO_DIR)/$(1).version $(PKG_INFO_DIR)/$(pkg).version; \