[openwrt/openwrt] include/package-pack: translate PKGARCH for APK

LEDE Commits lede-commits at lists.infradead.org
Tue Nov 19 10:52:08 PST 2024


robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/0d0a5eb4b590f6f1f50040a56a35179886b40e62

commit 0d0a5eb4b590f6f1f50040a56a35179886b40e62
Author: Robert Marko <robimarko at gmail.com>
AuthorDate: Tue Nov 19 13:12:28 2024 +0100

    include/package-pack: translate PKGARCH for APK
    
    We have a lot of script-only packages that are universal for all arch-s
    and those set PKGARCH:=all to indicate it.
    
    Unfortunately, APK expects architecture to be set to "noarch" instead to
    indicate that its universal so instead of having to update all packages
    that set PKGARCH:=all and thus break OPKG lets simply translate "all" to
    "noarch" when generating the APK package.
    
    This will be required as soon we update APK to include [1] as it will start
    enforcing package architecture checks.
    
    [1] https://gitlab.alpinelinux.org/alpine/apk-tools/-/commit/c1a3e69f24e235fc78f4dddb1f85fdf281464446
    
    Suggested-by: Jonas Gorski <jonas.gorski at gmail.com>
    Link: https://github.com/openwrt/openwrt/pull/17015
    Signed-off-by: Robert Marko <robimarko at gmail.com>
---
 include/package-pack.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/package-pack.mk b/include/package-pack.mk
index e9892f9ca6..3ac7a036f9 100644
--- a/include/package-pack.mk
+++ b/include/package-pack.mk
@@ -344,7 +344,7 @@ else
 	  --info "name:$(1)$$(ABIV_$(1))" \
 	  --info "version:$(VERSION)" \
 	  --info "description:$$(call description_escape,$$(strip $$(Package/$(1)/description)))" \
-	  --info "arch:$(PKGARCH)" \
+	  $(if $(findstring all,$(PKGARCH)),--info "arch:noarch",--info "arch:$(PKGARCH)") \
 	  --info "license:$(LICENSE)" \
 	  --info "origin:$(SOURCE)" \
 	  --info "url:$(URL)" \




More information about the lede-commits mailing list