Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 282618 - bump portage dependency on python to 2.5
Summary: bump portage dependency on python to 2.5
Status: RESOLVED FIXED
Alias: None
Product: Gentoo/Alt
Classification: Unclassified
Component: Prefix Support (show other bugs)
Hardware: All Linux
: High normal
Assignee: Gentoo Prefix
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-08-24 21:37 UTC by Stelian Ionescu
Modified: 2009-08-26 10:02 UTC (History)
0 users

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


Attachments
Use bootstrap python for portage (bootstrap-prefix.sh.patch,402 bytes, patch)
2009-08-24 21:38 UTC, Stelian Ionescu
Details | Diff
Use python from environment (bootstrap-prefix.sh.patch,395 bytes, patch)
2009-08-24 22:17 UTC, Stelian Ionescu
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Stelian Ionescu 2009-08-24 21:37:49 UTC
Using CentOS 5.3(which only has python 2.4) I get this:

Traceback (most recent call last):
  File "/home/hechee/gentoo/usr/bin/emerge", line 37, in ?
    from _emerge.main import emerge_main
  File "/home/hechee/gentoo/usr/lib/portage/pym/_emerge/main.py", line 51, in ?
    from _emerge.actions import action_config, action_sync, action_metadata, \
  File "/home/hechee/gentoo/usr/lib/portage/pym/_emerge/actions.py", line 45, in ?
    from _emerge.depgraph import backtrack_depgraph, depgraph, resume_depgraph
  File "/home/hechee/gentoo/usr/lib/portage/pym/_emerge/depgraph.py", line 1102
    finally:
          ^
SyntaxError: invalid syntax


Apparently, although the configure script of portage 2.2.00.13878 checks for python >= 2.4, it needs 2.5 so this wasn't caught during configuration
Comment 1 Stelian Ionescu 2009-08-24 21:38:14 UTC
Created attachment 202201 [details, diff]
Use bootstrap python for portage
Comment 2 Jeremy Olexa (darkside) (RETIRED) archtester gentoo-dev Security 2009-08-24 21:52:13 UTC
The bootstrap python should pick up whatever python is in your PATH first. Are you sure that prefix'd python is first?
Comment 3 Jeremy Olexa (darkside) (RETIRED) archtester gentoo-dev Security 2009-08-24 21:52:31 UTC
(In reply to comment #2)
> The bootstrap python should pick up whatever python is in your PATH first. Are
> you sure that prefix'd python is first?
> 

The bootstrap portage*
Comment 4 Stelian Ionescu 2009-08-24 22:16:36 UTC
Yes, the bootstrap python is first, but emerge uses the system python because the magic first line is «#!/usr/bin/python» which should be instead «#!/usr/bin/env python»
Comment 5 Stelian Ionescu 2009-08-24 22:17:10 UTC
Created attachment 202206 [details, diff]
Use python from environment
Comment 6 Jeremy Olexa (darkside) (RETIRED) archtester gentoo-dev Security 2009-08-24 23:39:37 UTC
(In reply to comment #4)
> Yes, the bootstrap python is first, but emerge uses the system python because
> the magic first line is «#!/usr/bin/python» which should be instead
> «#!/usr/bin/env python»
> 

That is my point. It feels like a regression to me, because it use to grab the python in $EPREFIX/tmp/...
Comment 7 Jeremy Olexa (darkside) (RETIRED) archtester gentoo-dev Security 2009-08-25 01:08:22 UTC
Ok, two things.

1) portage trunk now requires 2.5. Since the prefix branch has a different build system, it went unknown until someone with only 2.4 tried to use it. That was you, sorry...

This might work?!?

%% svn di
Index: configure.in
===================================================================
--- configure.in        (revision 14154)
+++ configure.in        (working copy)
@@ -31,7 +31,7 @@
 AC_PROG_EGREP
 
 GENTOO_PATH_XCU_ID()
-GENTOO_PATH_PYTHON([2.4])
+GENTOO_PATH_PYTHON([2.5])
 
 AC_PATH_PROG(PORTAGE_RM, [rm], no)
 AC_PATH_PROG(PORTAGE_MV, [mv], no)

2) There is a problem with the shebang line of emerge. It should, under no circumstance, be /usr/bin/python. Either the abs path (preferred), or /usr/bin/env.

Since the first line of the *source* is: #!@PORTAGE_PYTHON@ - You would think that this is plugged in from configure. Which leads me to two conclusions, a) regression *somehow*, or b) the user's path was incorrect (but Stelian says that it is correct and you can only trust what the bug reporter says otherwise you are doomed)

I hope this analysis helps grobian triage the issue. =)
Comment 8 Stelian Ionescu 2009-08-25 02:20:58 UTC
I tried bootstrapping again and I can't reproduce it any more, so probably my $PATH was wrong
Comment 9 Fabian Groffen gentoo-dev 2009-08-25 05:25:48 UTC
your path was wrong, or you continued with the broken symlink you has, as reported yesterday
Comment 10 Fabian Groffen gentoo-dev 2009-08-25 05:26:39 UTC
Jeremy's patch should be applied to the prefix branch of portage, including an ebuild update for the same dependency
Comment 11 Fabian Groffen gentoo-dev 2009-08-26 10:02:30 UTC
fixed in 2.2.00.14159, thanks all