Skip to content

Commit

Permalink
imagebuilder: init APK dirs every time
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
aparcar committed Nov 9, 2024
1 parent 15b7994 commit 12a7307
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion target/imagebuilder/files/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 \
Expand Down

0 comments on commit 12a7307

Please sign in to comment.