Re: [gentoo-portage-dev] Portage upgrade from 2.3.62 to 2.3.65 fails

2019-10-09 Thread Zac Medico
On 10/9/19 4:59 AM, Joakim Tjernlund wrote:
> Trying to upgrade portage in an older embedded target I get:
> When upgrading from old 2.3.62 
> >>> Merging sys-apps/portage-2.3.65 to /
> /usr/bin/python3.4: Error while finding spec for 
> 'portage._compat_upgrade.default_locations' (: No module 
> named 'portage._compat_upgrade')
>  * ERROR: sys-apps/portage-2.3.65::tmv3-target-overlay failed (preinst 
> phase):
>  *   (no error message)
>  *
>  * Call stack:
>  * ebuild.sh, line 133:  Called pkg_preinst
>  *   environment, line 3193:  Called die
>  * The specific snippet of code:
>  *   env -u DISTDIR -u PORTAGE_OVERRIDE_EPREFIX -u 
> PORTAGE_REPOSITORIES -u PORTDIR -u PORTDIR_OVERLAY 
> PYTHONPATH="${D%/}${PYTHON_SITEDIR}${PYTHONPATH:+:${PYTHONPATH}}" "${PYTHON}" 
> -m portage._compat_upgrade.default_locations || die;
>  *
> 
> Not a python expert but isn't portage trying to use a new function in 
> portage(portage._compat_upgrade.default_locations) before
> it is installed?
> 
> How should I resolve this?

That's a strange failure, since this code from the ebuild should die
earlier with a "No such directory" error if something is wrong:

> pkg_preinst() {
>   python_setup
>   python_export PYTHON_SITEDIR
>   [[ -d ${D%/}${PYTHON_SITEDIR} ]] || die "${D%/}${PYTHON_SITEDIR}: No 
> such directory"
>   env -u DISTDIR \
>   -u PORTAGE_OVERRIDE_EPREFIX \
>   -u PORTAGE_REPOSITORIES \
>   -u PORTDIR \
>   -u PORTDIR_OVERLAY \
>   
> PYTHONPATH="${D%/}${PYTHON_SITEDIR}${PYTHONPATH:+:${PYTHONPATH}}" \
>   "${PYTHON}" -m portage._compat_upgrade.default_locations || die

Apparently your overlay has modified the portage-2.3.65 ebuild to add
python3_4 to PYTHON_COMPAT. Check if this file exists (it's supposed
to but the error seems to indicate that python didn't find it):

/var/tmp/portage/sys-apps/portage-2.3.65/image/usr/lib*/python3.4/site-packages/portage/_compat_upgrade/default_locations.py

Thanks,
Zac



signature.asc
Description: OpenPGP digital signature


[gentoo-portage-dev] Portage upgrade from 2.3.62 to 2.3.65 fails

2019-10-09 Thread Joakim Tjernlund
Trying to upgrade portage in an older embedded target I get:
When upgrading from old 2.3.62 
>>> Merging sys-apps/portage-2.3.65 to /
/usr/bin/python3.4: Error while finding spec for 
'portage._compat_upgrade.default_locations' (: No module 
named 'portage._compat_upgrade')
 * ERROR: sys-apps/portage-2.3.65::tmv3-target-overlay failed (preinst 
phase):
 *   (no error message)
 *
 * Call stack:
 * ebuild.sh, line 133:  Called pkg_preinst
 *   environment, line 3193:  Called die
 * The specific snippet of code:
 *   env -u DISTDIR -u PORTAGE_OVERRIDE_EPREFIX -u PORTAGE_REPOSITORIES 
-u PORTDIR -u PORTDIR_OVERLAY 
PYTHONPATH="${D%/}${PYTHON_SITEDIR}${PYTHONPATH:+:${PYTHONPATH}}" "${PYTHON}" 
-m portage._compat_upgrade.default_locations || die;
 *

Not a python expert but isn't portage trying to use a new function in 
portage(portage._compat_upgrade.default_locations) before
it is installed?

How should I resolve this?


 Jocke