]> git.ipfire.org Git - thirdparty/openwrt.git/commit
build: add support for virtual provides
authorGeorge Sapkin <george@sapk.in>
Thu, 25 Dec 2025 13:32:29 +0000 (15:32 +0200)
committerRobert Marko <robimarko@gmail.com>
Fri, 2 Jan 2026 17:11:03 +0000 (18:11 +0100)
commit40baf2f82cb9bdc14916f3588f9710baf8273fc6
tree5b97ae40b2eab8d8eee52a1744186aae52e770f2
parent3abc02c2eb03b34166681fd53ce469caa6446d37
build: add support for virtual provides

Allow defining virtual provides using the PROVIDES field by prefixing
them with @, e.g.:

PROVIDES:=@ca-certs

Virtual provides don't own the provided name and multiple packages with
the same virtual provides can be installed side-by-side. Packages must
still take care not to override each other's files.

Add an implicit self-provide to packages. apk can't handle self
provides, be it versioned or virtual, so opt for a suffix instead. This
allows several variants to provide the same virtual package without
adding extra provides to the default one, e.g. wget implicitly provides
wget-any and is marked as default, so wget-ssl can explicitly provide
@wget-any as well.

Filter out virtual provides when generating metadata.

Filter out virtual provides prefix and self provide where appropriate.

Signed-off-by: George Sapkin <george@sapk.in>
Link: https://github.com/openwrt/openwrt/pull/21288
(cherry picked from commit 5ed650acbfd9cfbfd6a381df7db060c9153bacfc)
Link: https://github.com/openwrt/openwrt/pull/21355
Signed-off-by: Robert Marko <robimarko@gmail.com>
include/package-pack.mk
include/package.mk
scripts/metadata.pm