I can confirm this. I am testing on the official Ubuntu 16.04 docker
image. The postinstallation script for uwsgi-python-plugin (which you
can find at /var/lib/dpkg/info/uwsgi-plugin-python.postinst) begins with
set -e
which means the script will exit if any command in it returns a non-zero
exit status. However, this requires a degree of defensive coding that
the script is lacking. When it runs
BINARY_IS_UWSGI_ALTERNATIVE="$(\
update-alternatives --list uwsgi 2>/dev/null \
| grep -c '/uwsgi_python$' \
)"
Grep does not find a match, so it returns 1, then the postinst script
exists with an error. You can verify this by adding
set -x
to the script, running it via dpkg, and watching the output
# dpkg --configure uwsgi-plugin-python
Setting up uwsgi-plugin-python (2.0.12-4ubuntu2) ...
+ DEFAULTFLAVOR_DOTLESS=python27
+ [ xpython27 = xpython27 ]
+ ALTERNATIVE_PRIORITY=75
+ update-alternatives --quiet --install /usr/lib/uwsgi/plugins/python_plugin.so
uwsgi-plugin-python /usr/lib/uwsgi/plugins/python27_plugin.so 75 --slave
/usr/bin/uwsgi_python uwsgi_python /usr/bin/uwsgi-core --slave
/usr/share/man/man1/uwsgi_python.1.gz uwsgi_python.1.gz
/usr/share/man/man1/uwsgi_python27.1.gz
+ update-alternatives --quiet --install /usr/bin/uwsgi uwsgi
/usr/bin/uwsgi_python27 35 --slave /usr/share/man/man1/uwsgi.1.gz uwsgi.1.gz
/usr/share/man/man1/uwsgi_python27.1.gz
+ update-alternatives --list uwsgi
+ grep -c /uwsgi_python$
+ BINARY_IS_UWSGI_ALTERNATIVE=0
dpkg: error processing package uwsgi-plugin-python (--configure):
subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
uwsgi-plugin-python
I think this could be fixed by changing the line with grep to
| grep -c '/uwsgi_python$' || true \
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1560761
Title:
package uwsgi-plugin-python3 2.0.12-4ubuntu2 failed to
install/upgrade: subprocess installed post-installation script
returned error exit status 1
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/uwsgi/+bug/1560761/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs