Update the Wine downgrade snippet for apt distros

This is now even more of a mess, because for some reason the codename
suffix changed again with Wine 6.17. To keep this compact, we now just
add the `-1` suffix for Wine 6.1 to Wine 6.17, and the `-2` suffix for
Wine 6.17 and above.

While we're add it, might as well add another variant to make it easier
to install an older version of `winehq-stable` or `winehq-devel`, if you
for some reason would want to do that.
This commit is contained in:
Robbert van der Helm
2021-09-18 16:19:52 +02:00
parent 060e6e65ab
commit 31dc23963c
+7 -3
View File
@@ -233,14 +233,18 @@ Wine. This can be done as follows:
- On Debian, Ubuntu, Linux Mint and other apt-based distros, you can use the
command below to install Wine Staging 6.4 after you add the WineHQ
repositories linked above. This command is a bit complicated because on these
repositories linked above. This command is a bit cryptic because on these
distros the Wine package is split up into multiple smaller packages, and the
package versions include the distros codename (e.g. `focal`, or `buster`).
package versions include the distros codename (e.g. `focal`, or `buster`) as
well as some numeric suffix. Change the version to whatever version of Wine
you want to install, and then run these commands under Bash:
```shell
version=6.4
variant=staging
codename=$(shopt -s nullglob; awk '/^deb https:\/\/dl\.winehq\.org/ { print $3; exit }' /etc/apt/sources.list /etc/apt/sources.list.d/*.list)
sudo apt install --install-recommends {winehq-staging,wine-staging,wine-staging-amd64,wine-staging-i386}=$version~$codename-1
suffix=$(dpkg --compare-versions "$version" ge 6.1 && ((dpkg --compare-versions "$version" ge 6.17 && echo "-2") || echo "-1"))
sudo apt install --install-recommends {"winehq-$variant","wine-$variant","wine-$variant-amd64","wine-$variant-i386"}="$version~$codename$suffix"
```
If you want to prevent these packages from being updated automatically, then