public inbox for gentoo-portage-dev@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-portage-dev] Portage upgrade from 2.3.62  to 2.3.65  fails
@ 2019-10-09 11:59 Joakim Tjernlund
  2019-10-10  5:20 ` Zac Medico
  0 siblings, 1 reply; 2+ messages in thread
From: Joakim Tjernlund @ 2019-10-09 11:59 UTC (permalink / raw
  To: gentoo-portage-dev@lists.gentoo.org

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' (<class 'ImportError'>: 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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [gentoo-portage-dev] Portage upgrade from 2.3.62 to 2.3.65 fails
  2019-10-09 11:59 [gentoo-portage-dev] Portage upgrade from 2.3.62 to 2.3.65 fails Joakim Tjernlund
@ 2019-10-10  5:20 ` Zac Medico
  0 siblings, 0 replies; 2+ messages in thread
From: Zac Medico @ 2019-10-10  5:20 UTC (permalink / raw
  To: gentoo-portage-dev, Joakim Tjernlund


[-- Attachment #1.1: Type: text/plain, Size: 2018 bytes --]

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' (<class 'ImportError'>: 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


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 981 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-10-10  5:20 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-10-09 11:59 [gentoo-portage-dev] Portage upgrade from 2.3.62 to 2.3.65 fails Joakim Tjernlund
2019-10-10  5:20 ` Zac Medico

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox