Skip to content

Commit

Permalink
package: use /dev/null for apk --repositories-file
Browse files Browse the repository at this point in the history
In preparation for APK version bump, use /dev/null instead of /dev/zero
for --repositories-file to mute an error in recent APK files.

New APK version use modern istream logic that are more sensible to the
kind of file passed and /dev/null is required to correctly handle an
empty repository file.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
  • Loading branch information
Ansuel committed Nov 15, 2024
1 parent a6c248e commit 8c018dc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions include/image.mk
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ endef
define Image/Manifest
$(if $(CONFIG_USE_APK), \
$(call apk,$(TARGET_DIR_ORIG)) list --quiet --manifest --no-network \
--repositories-file /dev/zero | sort | sed 's/ / - /' > \
--repositories-file /dev/null | 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 \
Expand Down Expand Up @@ -365,7 +365,7 @@ opkg_target = \

apk_target = \
$(call apk,$(mkfs_cur_target_dir)) --no-scripts \
--repositories-file /dev/zero --repository file://$(PACKAGE_DIR_ALL)/packages.adb
--repositories-file /dev/null --repository file://$(PACKAGE_DIR_ALL)/packages.adb


target-dir-%: FORCE
Expand Down
2 changes: 1 addition & 1 deletion package/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ ifneq ($(CONFIG_USE_APK),)
$(file >$(TMP_DIR)/apk_install_list,\
$(foreach pkg,$(shell cat $(PACKAGE_INSTALL_FILES) 2>/dev/null),$(pkg)$(call GetABISuffix,$(pkg))))
$(call apk,$(TARGET_DIR)) add --no-cache --initdb --no-scripts --arch $(ARCH_PACKAGES) \
--repositories-file /dev/zero --repository file://$(PACKAGE_DIR_ALL)/packages.adb \
--repositories-file /dev/null --repository file://$(PACKAGE_DIR_ALL)/packages.adb \
$$(cat $(TMP_DIR)/apk_install_list)
else
$(file >$(TMP_DIR)/opkg_install_list,\
Expand Down

0 comments on commit 8c018dc

Please sign in to comment.