build: detach apk repository handling from rootfs.mk

To better support imagebuilder declaring --repositories-file on calling
apk macro, detach this and --repository from rootfs.mk macro and move it
to package Makefile and image.mk where they are used to permit a more
generic usage.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
This commit is contained in:
Christian Marangi
2024-10-24 20:25:06 +02:00
parent 5667b380cd
commit 23e27d21d5
3 changed files with 9 additions and 6 deletions

View File

@@ -280,7 +280,8 @@ endef
define Image/Manifest
$(if $(CONFIG_USE_APK), \
$(call apk,$(TARGET_DIR_ORIG)) list --quiet --manifest --no-network | sort | sed 's/ / - /' > \
$(call apk,$(TARGET_DIR_ORIG)) list --quiet --manifest --no-network \
--repositories-file /dev/zero | sort | sed 's/ / - /' > \
$(BIN_DIR)/$(IMG_PREFIX)$(if $(PROFILE_SANITIZED),-$(PROFILE_SANITIZED)).manifest, \
$(call opkg,$(TARGET_DIR_ORIG)) list-installed > \
$(BIN_DIR)/$(IMG_PREFIX)$(if $(PROFILE_SANITIZED),-$(PROFILE_SANITIZED)).manifest \
@@ -333,7 +334,9 @@ opkg_target = \
$(call opkg,$(mkfs_cur_target_dir)) \
-f $(mkfs_cur_target_dir).conf
apk_target = $(call apk,$(mkfs_cur_target_dir)) --no-scripts
apk_target = \
$(call apk,$(mkfs_cur_target_dir)) --no-scripts \
--repositories-file /dev/zero --repository file://$(PACKAGE_DIR_ALL)/packages.adb
target-dir-%: FORCE