[openwrt/openwrt] include/package-pack: drop version from provides

LEDE Commits lede-commits at lists.infradead.org
Mon Oct 28 16:08:43 PDT 2024


ansuel pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/03e05253259cbdf5696d81f458dbfddb4530c758

commit 03e05253259cbdf5696d81f458dbfddb4530c758
Author: Paul Spooren <mail at aparcar.org>
AuthorDate: Sun Oct 27 16:36:33 2024 +0100

    include/package-pack: drop version from provides
    
    Adding a version to the provides causes it to conflict with other
    packages that provides the same package, further details are available
    here: https://gitlab.alpinelinux.org/alpine/apk-tools/-/blob/master/doc/apk-package.5.scd#L199
    
    This was intitally done, if I remember correctly, to support depending
    on the specific kernel modules. Due to patches to APK, versions
    containing hashes work now, too, so this is no longer required.
    
    Only add the version to packages that define an ABI version since other
    packages depend against the package name plus ABI version.
    
    While at it, format the now rather complex call.
    
    Fixes: https://github.com/openwrt/openwrt/issues/16795
    
    Signed-off-by: Paul Spooren <mail at aparcar.org>
---
 include/package-pack.mk | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/include/package-pack.mk b/include/package-pack.mk
index 9991050c14..a677318ca2 100644
--- a/include/package-pack.mk
+++ b/include/package-pack.mk
@@ -345,8 +345,16 @@ else
 	  --info "origin:$(SOURCE)" \
 	  --info "url:$(URL)" \
 	  --info "maintainer:$(MAINTAINER)" \
-	  --info "provides:$$(foreach prov,$$(filter-out $(1)$$(ABIV_$(1)),$(PROVIDES)$$(if $$(ABIV_$(1)), \
-		$(1) $(foreach provide,$(PROVIDES),$(provide)$$(ABIV_$(1))))),$$(prov)=$(VERSION) )" \
+	  --info "provides:$$(foreach prov,\
+			$$(filter-out $(1)$$(ABIV_$(1)), \
+			$(PROVIDES)$$(if $$(ABIV_$(1)), \
+				$(1)=$(VERSION) $(foreach provide, \
+					$(PROVIDES), \
+					$(provide)$$(ABIV_$(1))=$(VERSION) \
+				) \
+			) \
+		), \
+		$$(prov) )" \
 	  --script "post-install:$$(ADIR_$(1))/post-install" \
 	  --script "pre-deinstall:$$(ADIR_$(1))/pre-deinstall" \
 	  --info "depends:$$(foreach depends,$$(subst $$(comma),$$(space),$$(subst $$(space),,$$(subst $$(paren_right),,$$(subst $$(paren_left),,$$(Package/$(1)/DEPENDS))))),$$(depends))" \




More information about the lede-commits mailing list