[openwrt/openwrt] image: apk: dont fail on removing a package that doesnt exist

LEDE Commits lede-commits at lists.infradead.org
Fri Nov 29 02:32:00 PST 2024


robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/55dfe3fcea88c108c8b89e96138975965e60bc08

commit 55dfe3fcea88c108c8b89e96138975965e60bc08
Author: Robert Marko <robimarko at gmail.com>
AuthorDate: Thu Nov 28 19:16:23 2024 +0100

    image: apk: dont fail on removing a package that doesnt exist
    
    Currently, in case when a package in the device package list is marked with
    the "-"" prefix meaning that its supposed to be removed for that device but
    it was not actually previously built it will cause the APK to error out it
    and thus image generation will also fail.
    
    So, lets do what OPKG build step does and supress the error with the "-"
    prefix in make.
    
    Fixes: #17103
    Fixes: d788ab376f85 ("build: add APK package build capabilities")
    Link: https://github.com/openwrt/openwrt/pull/17106
    Signed-off-by: Robert Marko <robimarko at gmail.com>
---
 include/image.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/image.mk b/include/image.mk
index 70dc8e069b..fd6f76b277 100644
--- a/include/image.mk
+++ b/include/image.mk
@@ -373,7 +373,7 @@ ifneq ($(CONFIG_USE_APK),)
 	rm -rf $(mkfs_cur_target_dir)
 	$(CP) $(TARGET_DIR_ORIG) $(mkfs_cur_target_dir)
 	$(if $(mkfs_packages_remove), \
-		$(apk_target) del $(mkfs_packages_remove))
+		-$(apk_target) del $(mkfs_packages_remove))
 	$(if $(mkfs_packages_add), \
 		$(apk_target) add $(mkfs_packages_add))
 else




More information about the lede-commits mailing list