build: apk: Remove /run/apk/db.lock

Do not add the file /run/apk/db.lock to the root file system. The /run
folder should be on a tmpfs.

At runtime we should make /run point to a tmpfs. At build time we should
just remove the folder.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Link: https://github.com/openwrt/openwrt/pull/16961
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
This commit is contained in:
Hauke Mehrtens 2024-11-14 22:57:02 +01:00 committed by Christian Marangi
parent 487ca61f91
commit 71c14cbee5
No known key found for this signature in database
GPG Key ID: AC001D09ADBFEAD7
1 changed files with 1 additions and 0 deletions

View File

@ -101,6 +101,7 @@ ifneq ($(CONFIG_USE_APK),)
$(call apk,$(TARGET_DIR)) add --no-cache --initdb --no-scripts --arch $(ARCH_PACKAGES) \ $(call apk,$(TARGET_DIR)) add --no-cache --initdb --no-scripts --arch $(ARCH_PACKAGES) \
--repositories-file /dev/null --repository file://$(PACKAGE_DIR_ALL)/packages.adb \ --repositories-file /dev/null --repository file://$(PACKAGE_DIR_ALL)/packages.adb \
$$(cat $(TMP_DIR)/apk_install_list) $$(cat $(TMP_DIR)/apk_install_list)
rm -rf $(TARGET_DIR)/run
else else
$(file >$(TMP_DIR)/opkg_install_list,\ $(file >$(TMP_DIR)/opkg_install_list,\
$(call opkg_package_files,\ $(call opkg_package_files,\