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

Bug 442802

Summary: x11-wm/openbox-3.5.0_p20121006 - data/autostart/openbox-xdg-autostart needs python2 shebang
Product: Gentoo Linux Reporter: Chris Mayo <aklhfex>
Component: New packagesAssignee: Markos Chandras (RETIRED) <hwoarang>
Status: RESOLVED FIXED    
Severity: normal CC: desktop-wm+disabled, lxde+disabled
Priority: Normal Keywords: PATCH
Version: unspecified   
Hardware: All   
OS: Linux   
URL: https://bugzilla.icculus.org/show_bug.cgi?id=5432
Whiteboard:
Package list:
Runtime testing required: ---

Description Chris Mayo 2012-11-11 19:16:20 UTC
/usr/libexec/openbox-xdg-autostart is not compatible with Python 3

Fixed for me by adding to src_prepare():
sed -i "s:python:python2:" data/autostart/openbox-xdg-autostart || die

This and other suggestions for openbox scripts that require Python 2 at upstream bug:
https://bugzilla.icculus.org/show_bug.cgi?id=5432


I do suggest adding an elog message that USE="python" is required to get xdg autostart, or even renaming the flag from python to xdg or similar. It took me quite a while to figure out that the default USE="-python" was the reason for my problem (spice-vdagent not starting), this bug was the easy bit.
Comment 1 Markos Chandras (RETIRED) gentoo-dev 2012-11-12 13:09:53 UTC
I don't want to rename the python useflag but I guess I can improve the description in metadata.xml
Comment 2 Chris Mayo 2012-11-12 18:19:05 UTC
I'm not sure updating the metadata is much of a help when this functionality is hiding behind one of the most widely used global USE flags described as:
"Adds optional support/bindings for the Python language"

It's not adding Python support but requiring a Python module as a dependency.

I looked at the USE flags and saw nothing that looked relevant to xdg so wouldn't have queried the metadata. Eventually I went and read the ebuild.
But a better named USE flag (for the functionality it is providing), a log message or even turning the USE flag on by default would have saved me time.
Comment 3 Markos Chandras (RETIRED) gentoo-dev 2012-11-12 21:26:29 UTC
equery m openbox will tell you what 'python' means in this case. And since all xdg scripts require python to run, I think this a pretty reasonable choice. It is pretty common to run equery to understand what each flag does before trying to guess or reading the ebuild

In any case this is irrelevant to this bug
Comment 4 Markos Chandras (RETIRED) gentoo-dev 2012-11-30 20:18:31 UTC
+  30 Nov 2012; Markos Chandras <hwoarang@gentoo.org> metadata.xml,
+  openbox-3.5.0_p20121006.ebuild, openbox-9999.ebuild:
+  Convert python shebangs to python2. Describe the python useflag. Bug #442802
+