From: Petr Štetiar Date: Sun, 17 Nov 2024 06:50:05 +0000 (+0000) Subject: image: apk: remove explicit distfeeds handling X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=bdfae5a16679b41746b836a8f5dee66d1c778e41;p=openwrt%2Fstaging%2Fstintel.git image: apk: remove explicit distfeeds handling Currently the build fails due to the following: mv: cannot stat 'linux-mediatek_filogic/target-dir-7872e783/etc/apk/repositories': No such file or directory as the changes done in the commit e031dab93ec3 ("base-files: move apk distfeeds into directory") forget to adapt image generation part. While looking into this, I've realized, that we don't need this explicit handling in the image generating code since the feeds are solely configured by `base-files` and `apk` packages, so those should always provide the correct feeds content, so lets simply drop this unnecessary code. Moving away /etc/opkg is done to prevent opkg from picking up the remote feeds defined from base-files and only use the local feeds, but for apk we explicitly pass --repositories-file which disables parsing of /etc/apk/repositories and /etc/apk/repositories.d, so we do not need to backup anything. Fixes: #16981 Fixes: e031dab93ec3 ("base-files: move apk distfeeds into directory") Reported-by: Chen Minqiang Signed-off-by: Petr Štetiar [jonas.gorski: add an explicit explanation where the original mv comes from and why we don't need it for apk]. Signed-off-by: Jonas Gorski --- diff --git a/include/image.mk b/include/image.mk index 881d420ae1..70dc8e069b 100644 --- a/include/image.mk +++ b/include/image.mk @@ -372,12 +372,10 @@ target-dir-%: FORCE ifneq ($(CONFIG_USE_APK),) rm -rf $(mkfs_cur_target_dir) $(CP) $(TARGET_DIR_ORIG) $(mkfs_cur_target_dir) - mv $(mkfs_cur_target_dir)/etc/apk/repositories $(mkfs_cur_target_dir).repositories $(if $(mkfs_packages_remove), \ $(apk_target) del $(mkfs_packages_remove)) $(if $(mkfs_packages_add), \ $(apk_target) add $(mkfs_packages_add)) - mv $(mkfs_cur_target_dir).repositories $(mkfs_cur_target_dir)/etc/apk/repositories else rm -rf $(mkfs_cur_target_dir) $(mkfs_cur_target_dir).opkg $(CP) $(TARGET_DIR_ORIG) $(mkfs_cur_target_dir)