Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 406077 - net-p2p/tribler-5.5.18 version bump and enhancement when python 2 is not the default python interpreter
Summary: net-p2p/tribler-5.5.18 version bump and enhancement when python 2 is not the ...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Anthony Basile
URL:
Whiteboard:
Keywords: EBUILD, PATCH
Depends on:
Blocks:
 
Reported: 2012-02-27 20:21 UTC by Guillaume Castagnino
Modified: 2012-02-28 16:16 UTC (History)
0 users

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


Attachments
tribler-5.5.18.ebuild (tribler-5.5.18.ebuild,1.73 KB, text/plain)
2012-02-27 20:21 UTC, Guillaume Castagnino
Details
tribler-log2homedir.patch (tribler-log2homedir.patch,495 bytes, patch)
2012-02-27 20:22 UTC, Guillaume Castagnino
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Guillaume Castagnino 2012-02-27 20:21:54 UTC
Created attachment 303535 [details]
tribler-5.5.18.ebuild

First tribler has been updated to 5.5.18 and deserve a bump.

But adding to this, when python2 is not the default python interpreter, tribler is broken, since it's a python2 only app.

So making some modifications to the ebuild (shebang conversion and altering the startup script), it can run fine using the python2 interpreter even if python3 is the default selected python interpreter.

See attached the ebuild (for 5.5.18) that fixes the installation issue and shebang conversion when python2 is not the default. Basically, it adds a python_set_active_version directive and a python_convert_shebang.

Follow the modified tribler-log2homedir.patch invoking "python2" instead of "python".


Thanks !
Comment 1 Guillaume Castagnino 2012-02-27 20:22:22 UTC
Created attachment 303537 [details, diff]
tribler-log2homedir.patch

updated tribler-log2homedir.patch patch
Comment 2 Jeroen Roovers (RETIRED) gentoo-dev 2012-02-27 20:30:32 UTC
Comment on attachment 303535 [details]
tribler-5.5.18.ebuild

--- tribler-5.5.10-r1.ebuild    2012-02-14 21:40:40.000000000 +0100
+++ -   2012-02-27 21:30:13.541599891 +0100
@@ -34,6 +34,11 @@
 
 S=${WORKDIR}
 
+pkg_setup() {
+       python_set_active_version 2
+       python_pkg_setup
+}
+
 src_unpack() {
        unpack ${A}
        unpack ./data.tar.gz
@@ -42,6 +47,8 @@
 src_prepare() {
        epatch "${FILESDIR}/${PN}-fix-global-declarations.patch"
        epatch "${FILESDIR}/${PN}-log2homedir.patch"
+
+       python_convert_shebangs -r 2 .
 }
 
 src_compile() { :; }
Comment 3 Anthony Basile gentoo-dev 2012-02-28 16:16:50 UTC
Okay its in the tree.