Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 253586

Summary: [ebuild] kde-base/pykde4 installs wrong *.pyc files, other KDE4 packages fails to emerge
Product: Gentoo Linux Reporter: Oldrich Jedlicka <oldium.pro>
Component: New packagesAssignee: Gentoo KDE team <kde>
Status: RESOLVED FIXED    
Severity: normal    
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 230205    
Attachments: Updated ebuild containing partial workaround for python-2.6
Updated ebuild containing partial workaround for python-2.6
Updated ebuild with workaround - simplified to utilize fix from bug #253593
Patch for ebuild - simplified one

Description Oldrich Jedlicka 2009-01-03 18:18:02 UTC
KDE applications using python fail during configure phase with sandbox error (log taken from /var/log/sandbox/sandbox*.log):

unlink:    /usr/lib/python2.6/site-packages/PyKDE4/__init__.pyc
unlink:    /usr/lib/python2.6/site-packages/PyKDE4/pykdeconfig.pyc

The root cause is wrong pyc - it is not generated in pkg_postinst of pykde4's ebuild, but during build, so it contains reference to original python source file /var/tmp/portage...

Workaround for this is to modify ebuild - do not install those pyc files, but generate them via python_mod_optimize.
Comment 1 Oldrich Jedlicka 2009-01-03 18:21:33 UTC
Created attachment 177238 [details]
Updated ebuild containing partial workaround for python-2.6

The workaround in attached patch fixes pyc files in /usr/lib/python*/site-packages/PyKDE4/* only. There are more pyc files that probably need to be fixed too (located at /usr/kde/4.2/share/apps/pykde4, if you do use "kdeprefix" USE flag).
Comment 2 Oldrich Jedlicka 2009-01-03 18:30:24 UTC
I forgot to note that this is python-2.6 problem, python-2.5 looks like it is happy.
Comment 3 Oldrich Jedlicka 2009-01-03 20:03:15 UTC
Created attachment 177248 [details]
Updated ebuild containing partial workaround for python-2.6

Added python clean-up part
Comment 4 Oldrich Jedlicka 2009-01-03 20:18:12 UTC
Created attachment 177252 [details]
Updated ebuild with workaround - simplified to utilize fix from bug #253593

With the fix from bug #253593 the python_version function can be used again.
Comment 5 Tomáš Chvátal (RETIRED) gentoo-dev 2009-01-03 21:50:46 UTC
Post diff please please, it is hell to work throught pasted ebuild and our ones since we might update them and we dunno what changed and what not.
Thanks
Comment 6 Oldrich Jedlicka 2009-01-03 21:59:14 UTC
Created attachment 177270 [details, diff]
Patch for ebuild - simplified one
Comment 7 Oldrich Jedlicka 2009-01-03 22:00:01 UTC
The changes are only in new methods src_install, pkg_postinst and pkg_postrm.
Comment 8 Oldrich Jedlicka 2009-01-03 22:07:57 UTC
(In reply to comment #5)
> Post diff please please, it is hell to work throught pasted ebuild and our ones
> since we might update them and we dunno what changed and what not.
> Thanks

When using distributed version control, there should be no such problems like that. Just `git stash`, copy my version in your tree and you will see the changes via gitk (assumes you are using kde-testing via git).
Comment 9 Tomáš Chvátal (RETIRED) gentoo-dev 2009-01-03 22:12:24 UTC
On overlay -> fixored.