Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 446790 - app-text/calibre-0.9.9 - dev-python/PyQt4-4.9.6 triggers File "/var/tmp/portage/app-text/calibre-0.9.9/work/calibre/src/calibre/linux.py", line 223, in setup_completion /// return _("ERROR")) /// SyntaxError: invalid syntax
Summary: app-text/calibre-0.9.9 - dev-python/PyQt4-4.9.6 triggers File "/var/tmp/porta...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal with 1 vote (vote)
Assignee: Zac Medico
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-12-10 20:21 UTC by Chris Smith
Modified: 2012-12-12 10:27 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Smith 2012-12-10 20:21:35 UTC
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
Comment 1 Alexander Stein 2012-12-11 09:02:26 UTC
Yep, downgrading to =dev-python/PyQt4-4.9.5 makes calibre installable again.
Comment 2 Stefan Radermacher 2012-12-11 13:46:31 UTC
Wouldn't it make sense to a add an appropirate dependency to the calibre ebuild?
Comment 3 Alexander Stein 2012-12-11 15:45:18 UTC
Not sure if that is the right way, as installing calibre and upgrading PyQt4 to 4.9.6 afterwards works fine so far.
Comment 4 Zac Medico gentoo-dev 2012-12-12 09:14:02 UTC
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'))
Comment 5 Zac Medico gentoo-dev 2012-12-12 10:27:01 UTC
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