opam 2.1 and virtual packages
The situation with virtual packages isn't consistent accross distributions.
- Debian-based distributions' are supported since https://github.com/ocaml/opam/pull/4269 and provide a sometimes vital role (e.g. providing a common package name for a package with several versions or several variants)
- For some other distribution, virtual packages are not supported: e.g. RHEL-based distributions (incl. OpenSUSE), Homebrew (see #4548), Archlinux (see https://github.com/ocaml/opam-repository/issues/18540), Alpine, …
- Some distributions have a mixed story where their versions of that are usually simply aliases and are somewhat supported depending on the distribution. e.g. Gentoo, FreeBSD, (maybe homebrew is in this category?), …
The issue can be annoying for distributions that rely on them heavily (e.g. Fedora) and where opam 2.1 also supports the detection of available packages (see ~sys_available) in https://github.com/ocaml/opam/blob/17adc3b7670a7707a7b2ca15d8e9065f1642ee86/src/state/opamSysInteract.ml#L134
xref https://github.com/ocaml/opam-repository/pull/19102
Nevermind, archlinux have them too: https://github.com/ocaml/opam-repository/issues/18540 I'm going to edit the top comment
Some distributions do not have any (as far as i know at least): e.g. alpine, …
Nevermind...... (e.g. llvm-dev)
Following our discussion in ocaml/opam-repository#22548 :
on OpenSUSE, you can use the options --provides (with --match-exact) to search for a virtual package, or simply zypper what-provides ; however this requires to actually specify a virtual package name in the query (the output still lists the "real" package), while from my understanding opam calls zypper without any package name, so as to list all available and installed packages. I'm still investigating.