Virtual Packages
Description of the new feature / enhancement
For example, there are many OpenJDK flavors:
Oracle.JDK.21EclipseAdoptium.Temurin.21.JDKMicrosoft.OpenJDK.21Azul.Zulu.21.JDKBellSoft.LibericaJDK.21BellSoft.LibericaJDK.21.FullAmazon.Corretto.21
For packages that depend on OpenJDK 21, they do not have to tell the identity of the JDK that has already been installed in the system.
Winget packages that depend on OpenJDK try to install Microsoft.OpenJDK even though another JDK has already been installed.
We have to make them depend on another package that does not depend on a specific OpenJDK flavor instead of Microsoft.OpenJDK.
Proposed technical implementation details
- Provides a package named
VirtualPackage.OpenJDK.21.SDKas an example - Let the above packages provide it.
- If the user tries to install another package that depends on
VirtualPackage.OpenJDK.21.SDKand has installed at least one of OpenJDK 21 flavors before, no additional packages are installed. - If not installed yet, the one most recommended by the virtual package definition (
Microsoft.OpenJDK.21?) will be installed.
A similar system has been available in Ubuntu. (no most recommended package feature is not implemented)
Related to:
- #1789
@denelon We have to rewrite every version of OpenJDK packages when a new version is released. We have to add a new OpenJDK flavor that has just been available to every package that depends on OpenJDK.
Also related to -
- #2969
@Trenly It lacks how most recommended one is suggested. Non-advanced users should not know it. It is not kind to neglect to suggest a concrete package name.