Gentoo Archives: gentoo-portage-dev

From: Zac Medico <zmedico@g.o>
To: gentoo-portage-dev@l.g.o, Joakim Tjernlund <Joakim.Tjernlund@××××××××.com>
Subject: Re: [gentoo-portage-dev] Portage upgrade from 2.3.62 to 2.3.65 fails
Date: Thu, 10 Oct 2019 05:20:56
Message-Id: f9999c49-1ab8-10c8-df1e-7c928140681b@gentoo.org
In Reply to: [gentoo-portage-dev] Portage upgrade from 2.3.62 to 2.3.65 fails by Joakim Tjernlund
1 On 10/9/19 4:59 AM, Joakim Tjernlund wrote:
2 > Trying to upgrade portage in an older embedded target I get:
3 > When upgrading from old 2.3.62
4 > >>> Merging sys-apps/portage-2.3.65 to /
5 > /usr/bin/python3.4: Error while finding spec for 'portage._compat_upgrade.default_locations' (<class 'ImportError'>: No module named 'portage._compat_upgrade')
6 > * ERROR: sys-apps/portage-2.3.65::tmv3-target-overlay failed (preinst phase):
7 > * (no error message)
8 > *
9 > * Call stack:
10 > * ebuild.sh, line 133: Called pkg_preinst
11 > * environment, line 3193: Called die
12 > * The specific snippet of code:
13 > * 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;
14 > *
15 >
16 > Not a python expert but isn't portage trying to use a new function in portage(portage._compat_upgrade.default_locations) before
17 > it is installed?
18 >
19 > How should I resolve this?
20
21 That's a strange failure, since this code from the ebuild should die
22 earlier with a "No such directory" error if something is wrong:
23
24 > pkg_preinst() {
25 > python_setup
26 > python_export PYTHON_SITEDIR
27 > [[ -d ${D%/}${PYTHON_SITEDIR} ]] || die "${D%/}${PYTHON_SITEDIR}: No such directory"
28 > env -u DISTDIR \
29 > -u PORTAGE_OVERRIDE_EPREFIX \
30 > -u PORTAGE_REPOSITORIES \
31 > -u PORTDIR \
32 > -u PORTDIR_OVERLAY \
33 > PYTHONPATH="${D%/}${PYTHON_SITEDIR}${PYTHONPATH:+:${PYTHONPATH}}" \
34 > "${PYTHON}" -m portage._compat_upgrade.default_locations || die
35
36 Apparently your overlay has modified the portage-2.3.65 ebuild to add
37 python3_4 to PYTHON_COMPAT. Check if this file exists (it's supposed
38 to but the error seems to indicate that python didn't find it):
39
40 /var/tmp/portage/sys-apps/portage-2.3.65/image/usr/lib*/python3.4/site-packages/portage/_compat_upgrade/default_locations.py
41
42 Thanks,
43 Zac

Attachments

File name MIME type
signature.asc application/pgp-signature