Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 456310 - www-client/uzbl - /usr/bin/uzbl-browser should specify python version in shebang
Summary: www-client/uzbl - /usr/bin/uzbl-browser should specify python version in shebang
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: tharvik
URL:
Whiteboard:
Keywords:
Depends on: 513446
Blocks: 490348
  Show dependency tree
 
Reported: 2013-02-09 13:32 UTC by max
Modified: 2014-07-06 12:23 UTC (History)
1 user (show)

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


Attachments
Ebuild seding to use python2 (uzbl-2012.05.14.ebuild,3.03 KB, text/plain)
2014-06-02 19:29 UTC, tharvik
Details
Ebuild using python_fix_shebang (uzbl-2012.05.14.ebuild,3.01 KB, text/plain)
2014-06-03 08:12 UTC, tharvik
Details
Ebuild using python-single rather than python-utils (uzbl-2012.05.14.ebuild,3.05 KB, text/plain)
2014-06-03 13:12 UTC, tharvik
Details

Note You need to log in before you can comment on or make changes to this bug.
Description max 2013-02-09 13:32:49 UTC
Dear gentoo-Team,

the uzbl-Browser provided in www-client/uzbl is not calling python2, but 'env python', what will in many cases be python3.

Therefore, it wont run properly (uzbl-core can be used, the 'real thing' uzbl-tabbed will bring an import error for pygtk.)

Changing the interpreter to python2 solves it, once done for uzbl-tabbed it will load but not be able to accept any keystrokes/user input, so a second file has to be changed.

Files that have to be modified: 
/usr/bin/uzbl-tabbed
/usr/bin/uzbl-event-daemon

It is just necessary to change the leading line 
#! /usr/bin/env python

to

#! /usr/bin/python2

Have a nice day
Comment 1 tharvik 2014-06-02 19:29:29 UTC
Created attachment 378082 [details]
Ebuild seding to use python2

The given ebuild should fix the issue.
Comment 2 Sergey Popov gentoo-dev 2014-06-03 06:55:55 UTC
Comment on attachment 378082 [details]
Ebuild seding to use python2

The fix is not correct, you should use python_fix_shebang script from python-single-r1 eclass
Comment 3 tharvik 2014-06-03 08:12:25 UTC
Created attachment 378158 [details]
Ebuild using python_fix_shebang

Then this should work (using EPYTHON=python2 because pygtk does not have python3 as target).
Comment 4 Sergey Popov gentoo-dev 2014-06-03 10:43:59 UTC
Comment on attachment 378158 [details]
Ebuild using python_fix_shebang

fix_shebang string looks ok, except for EPYTHON thingie

you should not define EPYTHON directly and also - do not use python-utils-r1 directly in ebuilds

Use python-single-r1 and define PYTHON_COMPAT properly
Comment 5 tharvik 2014-06-03 13:12:15 UTC
Created attachment 378172 [details]
Ebuild using python-single rather than python-utils

Hopefully this will be the last version.
Remaining mistake could be calling python-single-r1_pkg_setup directly in pkg_setup.
Comment 6 Sven Vermeulen (RETIRED) gentoo-dev 2014-07-06 12:23:30 UTC
Ebuild update has been committed to the tree