Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 253586 - [ebuild] kde-base/pykde4 installs wrong *.pyc files, other KDE4 packages fails to emerge
Summary: [ebuild] kde-base/pykde4 installs wrong *.pyc files, other KDE4 packages fail...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo KDE team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: python-2.6
  Show dependency tree
 
Reported: 2009-01-03 18:18 UTC by Oldrich Jedlicka
Modified: 2009-01-03 22:12 UTC (History)
0 users

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


Attachments
Updated ebuild containing partial workaround for python-2.6 (pykde4-4.1.87.ebuild,1.34 KB, text/plain)
2009-01-03 18:21 UTC, Oldrich Jedlicka
Details
Updated ebuild containing partial workaround for python-2.6 (pykde4-4.1.87.ebuild,1.40 KB, text/plain)
2009-01-03 20:03 UTC, Oldrich Jedlicka
Details
Updated ebuild with workaround - simplified to utilize fix from bug #253593 (pykde4-4.1.87.ebuild,1.31 KB, text/plain)
2009-01-03 20:18 UTC, Oldrich Jedlicka
Details
Patch for ebuild - simplified one (pykde4-4.1.87.ebuild-simplified.patch,716 bytes, patch)
2009-01-03 21:59 UTC, Oldrich Jedlicka
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.