build: Honor DEFAULT_VARIANT for APK packages
authorPaul Spooren <mail@aparcar.org>
Wed, 30 Oct 2024 08:28:30 +0000 (09:28 +0100)
committerChristian Marangi <ansuelsmth@gmail.com>
Wed, 30 Oct 2024 13:17:33 +0000 (14:17 +0100)
Previously APK would complain as it wasn't sure which package to
install by default when multiple packages would provide the same name.

Now, give the package a higher provider priority to make APK
automatically select the "default" package.

Signed-off-by: Paul Spooren <mail@aparcar.org>
include/package-pack.mk

index a677318ca24e88ebeddc25817df0ff10b9769bcd..9d06c8b6471ba5b04fa646e67a1e20f42ccc9fe9 100644 (file)
@@ -355,6 +355,7 @@ else
                        ) \
                ), \
                $$(prov) )" \
+         $(if $(DEFAULT_VARIANT),--info "provider-priority:100") \
          --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))" \