From 31dc23963cf88adc4e7766c99d5c7034f6c0487c Mon Sep 17 00:00:00 2001 From: Robbert van der Helm Date: Sat, 18 Sep 2021 16:19:52 +0200 Subject: [PATCH] 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. --- README.md | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index b6469c29..cb6c5589 100644 --- a/README.md +++ b/README.md @@ -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