aboutsummaryrefslogtreecommitdiffstats
path: root/main/uwsgi/uwsgi.post-upgrade
diff options
context:
space:
mode:
authorJakub Jirutka <jakub@jirutka.cz>2020-02-04 15:16:16 +0100
committerJakub Jirutka <jakub@jirutka.cz>2020-02-04 15:46:17 +0100
commitbdaf9315081cb77b81c9c94c7621197954925fd1 (patch)
tree0c1e952b0661dfdfb549a40640278e104f317167 /main/uwsgi/uwsgi.post-upgrade
parentf6a72510bd8f7a891e719aaf1f8f37bda413b757 (diff)
downloadaports-bdaf9315081cb77b81c9c94c7621197954925fd1.tar.gz
aports-bdaf9315081cb77b81c9c94c7621197954925fd1.tar.bz2
aports-bdaf9315081cb77b81c9c94c7621197954925fd1.tar.xz
main/uwsgi: mitigate backward compat. breakage in -python3 and -gevent3
Packages uwsgi-python and uwsgi-gevent were removed and packages uwsgi-python3 and uwsgi-gevent3 renamed to uwsgi-python and uwsgi-gevent, respectively; without setting $provides and adding a warning message. This breakes backward compatibility with previous versions of the packages and thus introduces problems with upgrade to Alpine v3.11. The worst is that the names overlap, so when users with uwsgi-python or uwsgi-gevent (Python 2) installed upgrade to Alpine v3.11, they will suddenly end-up with Python 3 versions without noticing. This may lead to hard times trying to figure out why the app doesn't work correctly! Users with uwsgi-python3 or uwsgi-gevent3 installed will not be able to upgrade because of missing packages. After they find what happend and install uwsgi-python or uwsgi-gevent instead, they would have to also fix their uWSGI configuration to load correct plugin. Also all the major distros (except Arch Linux) name uWSGI Python 3 plugin as python3(_plugin.so) or python38(_plugin.so) and keep this name even after purging Python 2. That's consistent with naming Python 3 binary as python3 and not python. Unfortunately, there's no way how to fix this mess now without introducing another breaking change in v3.11 branch. This patch just fixes the upgrade path for uwsgi-python3 and uwsgi-gevent3 users and adds post-upgrade warning message. This problem was introduced in commit 3ee2dbe9737e86f9432a72e9cf49f41de7e5804b authored by @Leo and committed by @ncopa.
Diffstat (limited to 'main/uwsgi/uwsgi.post-upgrade')
-rw-r--r--main/uwsgi/uwsgi.post-upgrade15
1 files changed, 15 insertions, 0 deletions
diff --git a/main/uwsgi/uwsgi.post-upgrade b/main/uwsgi/uwsgi.post-upgrade
new file mode 100644
index 0000000000..793d0d442e
--- /dev/null
+++ b/main/uwsgi/uwsgi.post-upgrade
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+ver_new="$1"
+ver_old="$2"
+
+if [ "$(apk version -t "$ver_old" "2.0.18-r2")" = "<" ]; then
+ cat 1>&2 <<-EOF
+ *
+ * uWSGI plugins for Python 2 were removed. uwsgi-python and uwsgi-gevent
+ * are aliases for uwsgi-python3 and uwsgi-gevent3, respectively!
+ *
+ EOF
+fi
+
+exit 0