Package: python-support Version: 1.0.13 Severity: serious
update-python-modules calls dpkg-trigger with --no-await option. This means that packages calling update-python-modules will be configured even before the trigger is run. However, this is wrong, because the trigger does an important thing: creates empty __init__.py. As such, some packages are unusable until the trigger is run.
I attached two dummy packages to illustrate the problem:- foo ships a Python module and a script that uses this module. foo's modules are bytecompiled by python-support. - bar depends on foo and uses the script provided by foo in its postinst, but is completely Python-agnostic.
Installing foo and bar together fails: | # dpkg -i foo_1_all.deb bar_1_all.deb | Selecting previously deselected package foo. | (Reading database ... 14035 files and directories currently installed.) | Unpacking foo (from foo_1_all.deb) ... | Selecting previously deselected package bar. | Unpacking bar (from bar_1_all.deb) ... | Setting up foo (1) ... | Setting up bar (1) ... | Traceback (most recent call last): | File "/usr/bin/runfoo", line 2, in <module> | import foo | ImportError: No module named foo | dpkg: error processing bar (--install): | subprocess installed post-installation script returned error exit status 1 | Processing triggers for python-support ... | Errors were encountered while processing: | barIf I remove --no-await option, the packages can be successfully installed:
| # dpkg -i foo_1_all.deb bar_1_all.deb | Selecting previously deselected package foo. | (Reading database ... 14035 files and directories currently installed.) | Unpacking foo (from foo_1_all.deb) ... | Selecting previously deselected package bar. | Unpacking bar (from bar_1_all.deb) ... | Setting up foo (1) ... | Processing triggers for python-support ... | Setting up bar (1) ... -- Jakub Wilk
foo_1_all.deb
Description: application/debian-package
bar_1_all.deb
Description: application/debian-package