Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 348369 - bootstrapping failures
Summary: bootstrapping failures
Status: RESOLVED FIXED
Alias: None
Product: Gentoo/Alt
Classification: Unclassified
Component: Prefix Support (show other bugs)
Hardware: All Linux
: High critical (vote)
Assignee: Gentoo Prefix
URL:
Whiteboard:
Keywords:
Depends on: 347639 347867
Blocks: 349737
  Show dependency tree
 
Reported: 2010-12-10 15:43 UTC by Jeremy Olexa (darkside) (RETIRED)
Modified: 2011-01-04 16:45 UTC (History)
0 users

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


Attachments
2.2.01.17380 build.log (build.log,36.65 KB, text/plain)
2010-12-14 18:02 UTC, Jeremy Olexa (darkside) (RETIRED)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jeremy Olexa (darkside) (RETIRED) archtester gentoo-dev Security 2010-12-10 15:43:10 UTC
Using latest_tree, the bootstrapping process fails in my automated sandbox.

Emerging (12 of 14) dev-lang/python-2.7.1
Installing (12 of 14) dev-lang/python-2.7.1
Emerging (13 of 14) sys-apps/portage-2.2.01.17304
Installing (13 of 14) sys-apps/portage-2.2.01.17304 

Messages for sys-apps/portage-2.2.01.17304:
<snip; file collisions>

* None of the installed packages claim the file(s).
 * 
 * Package 'sys-apps/portage-2.2.01.17304' merged despite file
 * collisions. If necessary, refer to your elog messages for the whole
 * content of the above message.
 * ERROR: sys-apps/portage-2.2.01.17304 failed:
 *   PYTHON(): Failure of extraction of locally active version of Python
 * 
 * Call stack:
 *     ebuild.sh, line   53:  Called pkg_postinst
 *   environment, line 7734:  Called python_mod_optimize '/usr/lib/portage/pym'
 *   environment, line 9105:  Called PYTHON '--ABI'
 *   environment, line 5244:  Called die
 * The specific snippet of code:
 *                               die "${FUNCNAME}(): Failure of extraction of locally active version of Python";
 * 
 * If you need support, post the output of 'emerge --info =sys-apps/portage-2.2.01.17304',
 * the complete build log and the output of 'emerge -pqv =sys-apps/portage-2.2.01.17304'.
 * The complete build log is located at '/home/user/gentoo/prefix-tinderbox-debian/long-dirname-on-purpose/a/b/var/tmp/portage/sys-apps/portage-2.2.01.17304/temp/build.log'.
 * The ebuild environment file is located at '/home/user/gentoo/prefix-tinderbox-debian/long-dirname-on-purpose/a/b/var/tmp/portage/sys-apps/portage-2.2.01.17304/temp/environment'.
 * S: '/home/user/gentoo/prefix-tinderbox-debian/long-dirname-on-purpose/a/b/var/tmp/portage/sys-apps/portage-2.2.01.17304/work/prefix-portage-2.2.01.17304'
 * ERROR: sys-apps/portage-2.2.01.17304 failed:
 *   PYTHON(): Failure of extraction of locally active version of Python
 * 
 * Call stack:
 *     ebuild.sh, line   53:  Called pkg_postinst
 *   environment, line 7734:  Called python_mod_optimize '/usr/lib/portage/pym'
 *   environment, line 9250:  Called python_get_implementation
 *   environment, line 8691:  Called PYTHON '--ABI'
 *   environment, line 5244:  Called die
 * The specific snippet of code:
 *                               die "${FUNCNAME}(): Failure of extraction of locally active version of Python";
Comment 1 Fabian Groffen gentoo-dev 2010-12-10 16:51:39 UTC
what are the file collisions?
Comment 2 Fabian Groffen gentoo-dev 2010-12-10 16:54:08 UTC
Oh, wait, this is just portage's collisions.  I'll sync python so we get the fixes for setting an active python version in.
Comment 3 Fabian Groffen gentoo-dev 2010-12-10 16:59:27 UTC
Synced now.  Should be fixed.

What an incredibly clear error message by the way.
Comment 4 Jeremy Olexa (darkside) (RETIRED) archtester gentoo-dev Security 2010-12-10 17:01:33 UTC
ok, the script will fire at ~0500 UTC, I'll report back. thx
Comment 5 Jeremy Olexa (darkside) (RETIRED) archtester gentoo-dev Security 2010-12-11 18:48:51 UTC
Still fails, the resulting traceback is here (that i forgot to include before):

Traceback (most recent call last):
  File "/home/user/gentoo/prefix-tinderbox-debian/long-dirname-on-purpose/a/b/usr/lib/portage/bin/emerge", line 38, in <module>
    from _emerge.main import emerge_main
  File "/home/user/gentoo/prefix-tinderbox-debian/long-dirname-on-purpose/a/b/usr/lib/portage/pym/_emerge/main.py", line 40, in <module>
    from _emerge.actions import action_config, action_sync, action_metadata, \
  File "/home/user/gentoo/prefix-tinderbox-debian/long-dirname-on-purpose/a/b/usr/lib/portage/pym/_emerge/actions.py", line 39, in <module>
    from portage.package.ebuild.doebuild import _check_temp_dir
  File "/home/user/gentoo/prefix-tinderbox-debian/long-dirname-on-purpose/a/b/usr/lib/portage/pym/portage/package/ebuild/doebuild.py", line 7, in <module>
    import gzip
  File "/home/user/gentoo/prefix-tinderbox-debian/long-dirname-on-purpose/a/b/tmp/usr/lib/python2.6/gzip.py", line 9, in <module>
    import zlib
ImportError: No module named zlib
Comment 6 Jeremy Olexa (darkside) (RETIRED) archtester gentoo-dev Security 2010-12-13 16:49:08 UTC
I guess we now need to bootstrap python-2.7.1 if we aren't going to install python-2.6 via emerge?
Comment 7 Fabian Groffen gentoo-dev 2010-12-13 16:54:14 UTC
We should switch to an image which has python-2.7 to prevent the 2.6 leaving behind while not being used at all.  But I understand this is not going to be working here for some reason.
Comment 8 Jeremy Olexa (darkside) (RETIRED) archtester gentoo-dev Security 2010-12-13 16:58:42 UTC
This script uses latest_tree, so we can't really "switch" until I stop complaining :)
Comment 9 Fabian Groffen gentoo-dev 2010-12-13 16:59:32 UTC
yeah :/  Stop complaining! :D
Comment 10 Fabian Groffen gentoo-dev 2010-12-13 21:31:55 UTC
Portage or python unfortunately exports PORTAGE_PYTHON, which results in the configure check never searching for python, but just picking up that preset value.  This causes the problems.
Comment 11 Fabian Groffen gentoo-dev 2010-12-13 22:13:12 UTC
2.2.01.17380 should fix this.
Comment 12 Jeremy Olexa (darkside) (RETIRED) archtester gentoo-dev Security 2010-12-14 17:58:54 UTC
.
Comment 13 Jeremy Olexa (darkside) (RETIRED) archtester gentoo-dev Security 2010-12-14 18:02:07 UTC
Created attachment 257161 [details]
2.2.01.17380 build.log

(In reply to comment #11)
> 2.2.01.17380 should fix this.
> 

build.log attached this time from the command "./bootstrap-prefix.sh $EPREFIX portage | tee build.log" using latest_tree and TESTING_PV=2.2.01.17380 (and zlib is being bootstrapped based on yesterday's convo in irc)

What you don't see in the build.log is:

Traceback (most recent call last):
  File "/home/user/gentoo/prefix-tinderbox-debian/long-dirname-on-purpose/a/b/usr/bin/emerge", line 38, in <module>
    from _emerge.main import emerge_main
  File "/home/user/gentoo/prefix-tinderbox-debian/long-dirname-on-purpose/a/b/usr/lib/portage/pym/_emerge/main.py", line 40, in <module>
    from _emerge.actions import action_config, action_sync, action_metadata, \
  File "/home/user/gentoo/prefix-tinderbox-debian/long-dirname-on-purpose/a/b/usr/lib/portage/pym/_emerge/actions.py", line 39, in <module>
    from portage.package.ebuild.doebuild import _check_temp_dir
  File "/home/user/gentoo/prefix-tinderbox-debian/long-dirname-on-purpose/a/b/usr/lib/portage/pym/portage/package/ebuild/doebuild.py", line 7, in <module>
    import gzip
  File "/home/user/gentoo/prefix-tinderbox-debian/long-dirname-on-purpose/a/b/tmp/usr/lib/python2.6/gzip.py", line 9, in <module>
    import zlib
ImportError: No module named zlib

But, that is a python issue, I guess? (We explicitly disable SSL support in python in bootstrap-prefix.sh)
Comment 14 Fabian Groffen gentoo-dev 2010-12-14 19:28:41 UTC
If you could please capture the output of the entire build process, that would be quite helpfull.  The problem(s) are in:
- when python is emerged (2.7.1[-r00.1])
  * does it succeed
  * does it call eselect python set whatever version active
- when portage is emerged
  * does it find python 2.7.1
  * does it install
  * does it eventually run the next emerge

I will bootstrap again tomorrow on Solaris using the bootstrap docs.
Comment 15 Jeremy Olexa (darkside) (RETIRED) archtester gentoo-dev Security 2010-12-14 19:36:24 UTC
Wierd, your above hints actually made me think of something. The failure that I reopened this bug for is *before* the emerge steps, while still in the ./bootstrap-prefix.sh stage....
Comment 16 Fabian Groffen gentoo-dev 2010-12-14 19:50:05 UTC
Ohw, then I surpassed that stage by far yesterday on Solaris
Comment 17 Jeremy Olexa (darkside) (RETIRED) archtester gentoo-dev Security 2010-12-14 19:59:09 UTC
Ugh, ignore comment #15. I've been staring at this problem too long. I'm taking a break then getting the logs that you want later, probably tonight.
Comment 18 Fabian Groffen gentoo-dev 2010-12-15 21:16:51 UTC
ok, two issues:
1) if bootstrapped python doesn't find zlib, it doesn't build that module, and apparently portage requires gzip (zlib) these days.
Can be remedied by bootstrapping zlib before python

2) python ebuilds call
eselect python update --python2
but this doesn't set the usr/bin/python symlink
One needs to call "eselect python set X" for that.  This breaks the bootstrap as soon as portage is emerged.
Comment 19 Jeremy Olexa (darkside) (RETIRED) archtester gentoo-dev Security 2011-01-04 16:45:40 UTC
(In reply to comment #18)
> ok, two issues:
> 1) if bootstrapped python doesn't find zlib, it doesn't build that module, and
> apparently portage requires gzip (zlib) these days.
> Can be remedied by bootstrapping zlib before python

Not fixed, but I have an idea on how to fix python's setup.py to find the bootstrapped zlib.h

> 
> 2) python ebuilds call
> eselect python update --python2
> but this doesn't set the usr/bin/python symlink
> One needs to call "eselect python set X" for that.  This breaks the bootstrap
> as soon as portage is emerged.
> 

Fixed.