portage-1.5.187's temp/environment file contains: if [[ "$#" -eq 0 ]]; then if [[ "${active}" == "1" ]]; then if [[ -n "${SUPPORT_PYTHON_ABIS}" ]]; then die "${FUNCNAME}(): '--active' option cannot be used in ebuilds of packages supporting installation for multiple versions of Python"; fi; slot="$(/usr/bin/python -c 'from sys import version_info; print(".".join([str(x) for x in version_info[:2]]))')"; ... around about line 172. When the package is emerged, the installation process ends with: >>> Original instance of package unmerged safely. /usr/opt/gentoo/var/tmp/portage/sys-apps/portage-2.2.00.15187/temp/environment: line 182: /usr/bin/python: No such file or directory * Compilation and optimization of Python modules for Python ... /usr/opt/gentoo/var/tmp/portage/sys-apps/portage-2.2.00.15187/temp/environment: line 182: /usr/bin/python: No such file or directory /usr/opt/gentoo/var/tmp/portage/sys-apps/portage-2.2.00.15187/temp/environment: line 182: /usr/bin/python: No such file or directory /opt/gentoo/usr/bin/python2.6: can't open file '/opt/gentoo/usr/lib32/python/compileall.py': [Errno 2] No such file or directory /usr/opt/gentoo/var/tmp/portage/sys-apps/portage-2.2.00.15187/temp/environment: line 182: /usr/bin/python: No such file or directory /usr/opt/gentoo/var/tmp/portage/sys-apps/portage-2.2.00.15187/temp/environment: line 182: /usr/bin/python: No such file or directory [ !! ] ... note that the "/opt/gentoo/usr/lib32/python/compileall.py" path above should be "/opt/gentoo/usr/lib32/python2.6/compileall.py". This appears to be a recent problem, and appears to be due to a missing "${EPREFIX}" in python.eclass. With it inserted, all of the above problems are solved. (P.S. On the subject of non-prefix aware eclasses, cvs.eclass also hard-codes the path to python on line 384.)
thanks, both fixed
Oh - one more: The latest bash-completion also lacks an EPREFIX on line 35 of $EPREFIX/etc/profile.d/bash-completion.sh: $loaded_pre && source /usr/share/bash-completion/.post ... needs a prefix so as not to complain on each login.
I predict this is why I was seeing "bad marshal data" when using binpkgs. So, thanks. I'll confirm tomorrow. bash-completion is a seperate issue (not eclass), I fixed it.
(In reply to comment #3) > I predict this is why I was seeing "bad marshal data" when using binpkgs. So, > thanks. I'll confirm tomorrow. No luck, too bad. > > bash-completion is a seperate issue (not eclass), I fixed it. >
Please reopen this bug for this additional patch, needed on PREFIX installations without /usr/bin/env (e.g., Android): --- old_gentoo_armv6l/usr/portage/eclass/python.eclass 2014-06-13 14:56:48.119883970 +0200 +++ gentoo_armv6l/usr/portage/eclass/python.eclass 2014-06-13 14:57:32.607355352 +0200 @@ -1,6 +1,6 @@ # Copyright 1999-2013 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/python.eclass,v 1.169 2014/02/06 05:34:07 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/python.eclass,v 1.169 2014/02/06 05:34:07 vapier Exp bug300582 reloaded$ # @ECLASS: python.eclass # @MAINTAINER: @@ -1285,7 +1285,7 @@ fi cat << EOF > "${file}" -#!/usr/bin/env python +#!${EPREFIX}/usr/bin/env python # Gentoo '${file##*/}' wrapper script generated by python_generate_wrapper_scripts() import os (patch needed in gentooandroid.sourceforge.net to make $EPREFIX/usr/bin/xml2po work)
ugh! without /usr/bin/env many other things aren't going to work, I guess...
gentooandroid.sf.net distributes my stage3 with a working emerge installation, and it has no /usr/bin/env! I submit this patch above so that to make a stage1 that would work. Please reconsider it. Last month, my stage3 emerged 153 packages, including evince, firefox, gnucash. For that, I on ly needed to edit five *.ebuild files: - =app-text/recode-3.6_p17-r2 adding > use uncooperative-root && sed -i -e 's:^ #! /bin/sh\>: #! '"$EPREFIX/bin/sh"':w /dev/stderr' "${WORKDIR }"/${PN}_${MY_PV}-${DEB_PATCH}.diff - =sys-devel/automake-1.12.4.tbz2 adding > EAPI=5 ; IF_TOUCHED_WILL_BREAK_DEPENDENCIES=${WORKDIR}/automake-1.13.4/t/testsuite-part.am - three more ebuilds, just because gcc without -Wl,-dynamic-linker=$EPREFIX/lib/ld-linux-armhf.so.3 still links to /lib; heroxbd's Android's project's has fixed that so I will instead realy on that.