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

Bug 456310

Summary: www-client/uzbl - /usr/bin/uzbl-browser should specify python version in shebang
Product: Gentoo Linux Reporter: max <meinemsnaddy>
Component: Current packagesAssignee: tharvik
Status: RESOLVED FIXED    
Severity: normal CC: proxy-maint
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on: 513446    
Bug Blocks: 490348    
Attachments: Ebuild seding to use python2
Ebuild using python_fix_shebang
Ebuild using python-single rather than python-utils

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 (RETIRED) 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 (RETIRED) 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