[openwrt/openwrt] imagebuilder: init APK dirs every time

LEDE Commits lede-commits at lists.infradead.org
Sat Nov 9 07:46:59 PST 2024


aparcar pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/12a73078692da9d6b2e599d4cd4eb8a18daf3c63

commit 12a73078692da9d6b2e599d4cd4eb8a18daf3c63
Author: Paul Spooren <mail at aparcar.org>
AuthorDate: Fri Nov 8 10:37:16 2024 +0100

    imagebuilder: init APK dirs every time
    
    The `--initdb` command creates basic folders required by APK,
    previoiusly it would only run a single time when package_index is
    actually called. Since the function isn't called if nothing changes,
    `--initdb` doesn't initialize the rootfs again.
    
    This commit moves it to package_reload, which runs every time.
    
    Signed-off-by: Paul Spooren <mail at aparcar.org>
---
 target/imagebuilder/files/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/target/imagebuilder/files/Makefile b/target/imagebuilder/files/Makefile
index 914609ada1..72b36b0862 100644
--- a/target/imagebuilder/files/Makefile
+++ b/target/imagebuilder/files/Makefile
@@ -181,7 +181,6 @@ ifeq ($(CONFIG_USE_APK),)
 	) >/dev/null 2>/dev/null
 	$(OPKG) update >&2 || true
 else
-	$(APK) add --initdb
 	(cd $(PACKAGE_DIR); $(APK) mkndx \
 		$(if $(CONFIG_SIGNATURE_CHECK), --keys-dir $(APK_KEYS) --sign $(BUILD_KEY_APK_SEC)) \
 		--allow-untrusted --output packages.adb *.apk) >/dev/null 2>/dev/null || true
@@ -200,6 +199,7 @@ ifeq ($(CONFIG_USE_APK),)
 		$(OPKG) update >&2 || true; \
 	fi
 else
+	$(APK) add --initdb
 	if [ -d "$(PACKAGE_DIR)" ] && ( \
 			[ ! -f "$(PACKAGE_DIR)/packages.adb" ] || \
 			[ "`find $(PACKAGE_DIR) -cnewer $(PACKAGE_DIR)/packages.adb`" ] ); then \




More information about the lede-commits mailing list