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

Bug 477084

Summary: =www-apache/mod_spdy-0.9.3.3 fails when default python is python-3
Product: Gentoo Linux Reporter: Sergei Trofimovich (RETIRED) <slyfox>
Component: Current packagesAssignee: SpanKY <vapier>
Status: RESOLVED FIXED    
Severity: normal CC: hasufell, python
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: mod_spdy-9999.ebuild.patch
mod_spdy-9999.ebuild.patch

Description Sergei Trofimovich (RETIRED) gentoo-dev 2013-07-16 16:34:56 UTC
Created attachment 353466 [details, diff]
mod_spdy-9999.ebuild.patch

Various bits fail like that:

/tmp/portage/www-apache/mod_spdy-9999/work/depot_tools/gclient config http://mod-spdy.googlecode.com/svn/trunk/src
Your copy of depot_tools is configured to fetch from an obsolete URL:

  /gentoo/distfiles/egit-src/depot_tools.git


Remote URL updated.
  File "/tmp/portage/www-apache/mod_spdy-9999/work/depot_tools/gclient.py", line 203
    print 'Overwriting Var("webkit_trunk") with %s' % new_url
                                                  ^
SyntaxError: invalid syntax

Porting to python-single-r1 seems rather straightforward (fixed build failure for me):

--- mod_spdy-0.9.3.3.ebuild     2013-07-16 13:52:21.000000000 +0300
+++ mod_spdy-0.9.3.3-r1.ebuild  2013-07-16 19:26:05.042426655 +0300
@@ -3,7 +3,8 @@
 # $Header: /var/cvsroot/gentoo-x86/www-apache/mod_spdy/mod_spdy-0.9.3.3.ebuild,v 1.2 2013/07/16 10:52:21 slyfox Exp $
 
-EAPI="4"
+EAPI=5
 
-inherit apache-module eutils
+PYTHON_COMPAT=( python2_5 python2_6 python2_7 )
+inherit apache-module eutils python-single-r1
 
 if [[ ${PV} == 9999 ]] ; then
@@ -24,7 +25,9 @@
 SLOT="0"
 IUSE="debug test"
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
 
 RDEPEND="sys-libs/zlib[minizip]"
-DEPEND="${RDEPEND}"
+DEPEND="${RDEPEND}
+       ${PYTHON_DEPS}"
 if [[ ${PV} == 9999 ]] ; then
        DEPEND+=" net-misc/rsync"
@@ -72,5 +75,5 @@
        )
        #egclient runhooks "${myconf[@]}"
-       e python src/build/gyp_chromium "${myconf[@]}"
+       e ${EPYTHON} src/build/gyp_chromium "${myconf[@]}"
 }

Same goes for -9999 (attached):

Index: mod_spdy-9999.ebuild
===================================================================
RCS file: /var/cvsroot/gentoo-x86/www-apache/mod_spdy/mod_spdy-9999.ebuild,v
retrieving revision 1.2
diff -u -U2 -r1.2 mod_spdy-9999.ebuild
--- mod_spdy-9999.ebuild        16 Jul 2013 10:52:21 -0000      1.2
+++ mod_spdy-9999.ebuild        16 Jul 2013 16:33:54 -0000
@@ -3,7 +3,8 @@
 # $Header: /var/cvsroot/gentoo-x86/www-apache/mod_spdy/mod_spdy-9999.ebuild,v 1.2 2013/07/16 10:52:21 slyfox Exp $
 
-EAPI="4"
+EAPI=5
 
-inherit apache-module eutils
+PYTHON_COMPAT=( python2_5 python2_6 python2_7 )
+inherit apache-module eutils python-single-r1
 
 if [[ ${PV} == 9999 ]] ; then
@@ -24,4 +25,5 @@
 SLOT="0"
 IUSE="debug test"
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
 
 RDEPEND="sys-libs/zlib[minizip]"
@@ -72,5 +74,5 @@
        )
        #egclient runhooks "${myconf[@]}"
-       e python src/build/gyp_chromium "${myconf[@]}"
+       e ${EPYTHON} src/build/gyp_chromium "${myconf[@]}"
 }
 
Thanks!
Comment 1 Julian Ospald 2013-07-16 17:10:15 UTC
does it even install python files?
Comment 2 Julian Ospald 2013-07-16 17:13:57 UTC
apparently not, in that case python-single-r1 is the wrong choice

use "python-any-r1" and drop REQUIRED_USE
Comment 3 Sergei Trofimovich (RETIRED) gentoo-dev 2013-07-16 19:02:29 UTC
Created attachment 353470 [details, diff]
mod_spdy-9999.ebuild.patch

(In reply to Julian Ospald (hasufell) from comment #2)
> apparently not, in that case python-single-r1 is the wrong choice
> 
> use "python-any-r1" and drop REQUIRED_USE

Oh, another one :] I've also forgot a DEPEND last time.

Does this look better?

[sf] ~/portage/gentoo-x86/www-apache/mod_spdy:cvs diff -U1 mod_spdy-9999.ebuild 
Index: mod_spdy-9999.ebuild
===================================================================
RCS file: /var/cvsroot/gentoo-x86/www-apache/mod_spdy/mod_spdy-9999.ebuild,v
retrieving revision 1.2
diff -u -U1 -r1.2 mod_spdy-9999.ebuild
--- mod_spdy-9999.ebuild        16 Jul 2013 10:52:21 -0000      1.2
+++ mod_spdy-9999.ebuild        16 Jul 2013 19:00:46 -0000
@@ -4,5 +4,6 @@
 
-EAPI="4"
+EAPI=5
 
-inherit apache-module eutils
+PYTHON_COMPAT=( python2_5 python2_6 python2_7 )
+inherit apache-module eutils python-any-r1
Comment 4 SpanKY gentoo-dev 2014-01-29 21:00:08 UTC
(In reply to Sergei Trofimovich from comment #3)

looks fine; feel free to commit to all mod_spdy ebuilds
Comment 5 Sergei Trofimovich (RETIRED) gentoo-dev 2014-01-30 18:28:09 UTC
Pushed as:

> 30 Jan 2014; Sergei Trofimovich <slyfox@gentoo.org> mod_spdy-0.9.3.3.ebuild,
> mod_spdy-9999.ebuild:
> Fix build failure when python-3 is active by switching to python-single-r1
> (bug #477084).

Thanks!

PS: the live ebuild patches did bitrot a bit (i didn't touch them)