void-linux / xbps

The X Binary Package System (XBPS)

Home Page:https://voidlinux.org/xbps/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Feature request] xbps-install interactive choice for selecting virtual provider

JamiKettunen opened this issue · comments

Some packages depend on virtual?java-runtime for example which is provided by openjdk17-jre and openjdk11-jre at least. Currently (xbps-0.59.1_7) though the default provider to install appears to be completely arbitrary and depends on the sorting of the package index on the mirror.

Obviously if the user has configured virtualpkg=... in /etc/xbps.d or whatever that should be prioritized (or given as the default choice when just pressing enter?) when installing something and installed always during non-interactive cases with --yes (just like it works presently).

Related code:

Here's how an "interactive virtual provider choice" looks like on pacman (Arch Linux) for example:

# pacman -S java-runtime
:: There are 4 providers available for java-runtime:
:: Repository extra
   1) jre-openjdk  2) jre11-openjdk  3) jre17-openjdk  4) jre8-openjdk

Enter a number (default=1):

@classabbyamp @paper42 would know a bit more about this as we discussed this a few months back in August on #xbps.

If you want to select another provider during install-time without setting a preference via xbps.d(5) you have to name the provider package also in the same install command or later remove the one you didn't want after replacing it.