Is there a way to install a package using apt-get install without update-alternatives being invoked? Or at least being able to specify your own custom priority for the new links added by update-alternatives?
In my scenario I want to install multiple JDK versions. JDK 11 is (while writing this) LTS so I would prefer if all links used that.
However the issue is that apparently the update-alternatives priority for the JDK packages is based on the version:
openjdk-11-jdk-headless: 1111openjdk-13-jdk-headless: 1311openjdk-14-jdk-headless: 1411
So if I additionally install JDK 13 or 14 all links would use that as first choice instead.
While I could use update-alternatives --config to change to "manual mode", this seems tedious because it appears this has to be done for every link on its own (JDK 14 adds 33 links) and error-prone in case a new binary is added in a future version, but does not exist in an older one.