]> git.ipfire.org Git - thirdparty/openwrt.git/commitdiff
build: restore opkg-related provides logic 21409/head
authorGeorge Sapkin <george@sapk.in>
Mon, 5 Jan 2026 14:26:47 +0000 (16:26 +0200)
committerHauke Mehrtens <hauke@hauke-m.de>
Mon, 5 Jan 2026 22:27:40 +0000 (23:27 +0100)
Re-add opkg provides logic to CONTROL when USE_APK is not set and remove
virtual provider prefix.

Fixes: cefbf11 ("build: refactor provides logic")
Fixes: https://github.com/openwrt/openwrt/issues/21372
Fixes: https://github.com/openwrt/openwrt/issues/21382
Fixes: https://github.com/openwrt/openwrt/issues/21402
Signed-off-by: George Sapkin <george@sapk.in>
Link: https://github.com/openwrt/openwrt/pull/21409
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
include/package-pack.mk

index 15c06fab0bcb978de3492a8f6575f7d3597cfca8..0c01112b27dad29f28f836298df0ed74cba3bf50 100644 (file)
@@ -324,7 +324,12 @@ endif
       Package/$(1)/DEPENDS := $$(call mergelist,$$(Package/$(1)/DEPENDS))
     endif
 
-    Package/$(1)/PROVIDES := $$(call FormatProvides,$(1),$(VERSION),$(PROVIDES),$(ALTERNATIVES))
+    ifeq ($(CONFIG_USE_APK),)
+      Package/$(1)/PROVIDES := $$(patsubst @%,%,$(PROVIDES))
+      Package/$(1)/PROVIDES := $$(filter-out $(1)$$(ABIV_$(1)),$$(Package/$(1)/PROVIDES)$$(if $$(ABIV_$(1)), $(1) $$(foreach provide,$$(Package/$(1)/PROVIDES),$$(provide)$$(ABIV_$(1)))))
+    else
+      Package/$(1)/PROVIDES := $$(call FormatProvides,$(1),$(VERSION),$(PROVIDES),$(ALTERNATIVES))
+    endif
 
 $(_define) Package/$(1)/CONTROL
 Package: $(1)$$(ABIV_$(1))