]> 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>
Wed, 31 Dec 2025 17:16:48 +0000 (18:16 +0100)
commit5ed650acbfd9cfbfd6a381df7db060c9153bacfc
tree380398223c81ed405edb91708455ad003362cbc1
parentcefbf1184f860b3ae29ea7a06d79b49c40879277
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
Signed-off-by: Robert Marko <robimarko@gmail.com>
include/package-pack.mk
include/package.mk
scripts/metadata.pm