app-text/calibre-0.9.9 fails to install - might be related to upgrade to dev-python/PyQt4-4.9.6 Reproducible: Always Actual Results: Installing resources to /var/tmp/portage/app-text/calibre-0.9.9/image/usr/share/calibre Setting up bash completion... ____________________ WARNING ____________________ Setting up completion failed with error: __________________________________________________ Traceback (most recent call last): File "/var/tmp/portage/app-text/calibre-0.9.9/work/calibre/src/calibre/linux.py", line 223, in setup_completion from calibre.gui2.lrf_renderer.main import option_parser as lrfviewerop File "/var/tmp/portage/app-text/calibre-0.9.9/work/calibre/src/calibre/gui2/lrf_renderer/main.py", line 13, in <module> from calibre.gui2.dialogs.conversion_error import ConversionErrorDialog File "/var/tmp/portage/app-text/calibre-0.9.9/work/calibre/src/calibre/gui2/dialogs/conversion_error.py", line 5, in <module> from calibre.gui2.dialogs.conversion_error_ui import Ui_ConversionErrorDialog File "/var/tmp/portage/app-text/calibre-0.9.9/work/calibre/src/calibre/gui2/dialogs/conversion_error_ui.py", line 21 return _("ERROR")) ^ SyntaxError: invalid syntax Setting up desktop integration... Installing calibre environment module: /var/tmp/portage/app-text/calibre-0.9.9/image/usr/lib64/python2.7/site-packages/init_calibre.py calibre successfully installed. You can start it by running the command calibre There were 1 warning(s): * Setting up completion failed with error: install: cannot stat ‘/var/tmp/portage/app-text/calibre-0.9.9/image/usr/etc/bash_completion.d/calibre’: No such file or directory !!! doins: /var/tmp/portage/app-text/calibre-0.9.9/image/usr/etc/bash_completion.d/calibre does not exist * ERROR: app-text/calibre-0.9.9 failed (install phase): * doins failed
Yep, downgrading to =dev-python/PyQt4-4.9.5 makes calibre installable again.
Wouldn't it make sense to a add an appropirate dependency to the calibre ebuild?
Not sure if that is the right way, as installing calibre and upgrading PyQt4 to 4.9.6 afterwards works fine so far.
Somehow, it's corrupting that conversion_error_ui.py file. The code seems to generate properly though, if I run the following in the python interpreter: from PyQt4.uic import compileUi compileUi('/var/tmp/portage/app-text/calibre-0.9.9/work/calibre/src/calibre/gui2/dialogs/conversion_error.ui', open('/tmp/conversion_error_ui.py', 'wb'))
I've added this workaround to the ebuild: # Disable destructive regex for Bug #446790. if has_version '>=dev-python/PyQt4-4.9.6' ; then sed -e "s|dat = re\.compile(r'QtGui\.QApplication\.translate.*|#\\0|" \ -i src/calibre/gui2/__init__.py || die fi