Gentoo Archives: gentoo-portage-dev

From: Brian Dolbec <dolsen@g.o>
To: gentoo-portage-dev@l.g.o
Subject: Re: [gentoo-portage-dev] [PATCH] _doebuild_path: add fallback for temp PORTAGE_BIN_PATH (bug 547086)
Date: Tue, 21 Apr 2015 23:20:27
Message-Id: 20150421162019.5e89f3e8.dolsen@gentoo.org
In Reply to: [gentoo-portage-dev] [PATCH] _doebuild_path: add fallback for temp PORTAGE_BIN_PATH (bug 547086) by Zac Medico
1 On Sun, 19 Apr 2015 12:27:10 -0700
2 Zac Medico <zmedico@g.o> wrote:
3
4 > X-Gentoo-Bug: 547086
5 > X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=547086
6 > ---
7 > pym/portage/package/ebuild/doebuild.py | 19 +++++++++++++------
8 > 1 file changed, 13 insertions(+), 6 deletions(-)
9 >
10 > diff --git a/pym/portage/package/ebuild/doebuild.py
11 > b/pym/portage/package/ebuild/doebuild.py index 1be83ad..4d926c7 100644
12 > --- a/pym/portage/package/ebuild/doebuild.py
13 > +++ b/pym/portage/package/ebuild/doebuild.py
14 > @@ -195,7 +195,10 @@ def _doebuild_path(settings, eapi=None):
15 >
16 > # Note: PORTAGE_BIN_PATH may differ from the global constant
17 > # when portage is reinstalling itself.
18 > - portage_bin_path = settings["PORTAGE_BIN_PATH"]
19 > + portage_bin_path = [settings["PORTAGE_BIN_PATH"]]
20 > + if portage_bin_path[0] != portage.const.PORTAGE_BIN_PATH:
21 > + # Add a fallback path for restarting failed builds
22 > (bug 547086)
23 > +
24 > portage_bin_path.append(portage.const.PORTAGE_BIN_PATH) eprefix =
25 > portage.const.EPREFIX prerootpath = [x for x in
26 > settings.get("PREROOTPATH", "").split(":") if x] rootpath = [x for x
27 > in settings.get("ROOTPATH", "").split(":") if x] @@ -210,18 +213,22
28 > @@ def _doebuild_path(settings, eapi=None): path = overrides
29 >
30 > if "xattr" in settings.features:
31 > - path.append(os.path.join(portage_bin_path,
32 > "ebuild-helpers", "xattr"))
33 > + for x in portage_bin_path:
34 > + path.append(os.path.join(x,
35 > "ebuild-helpers", "xattr"))
36 > if uid != 0 and \
37 > "unprivileged" in settings.features and \
38 > "fakeroot" not in settings.features:
39 > - path.append(os.path.join(portage_bin_path,
40 > - "ebuild-helpers", "unprivileged"))
41 > + for x in portage_bin_path:
42 > + path.append(os.path.join(x,
43 > + "ebuild-helpers", "unprivileged"))
44 >
45 > if settings.get("USERLAND", "GNU") != "GNU":
46 > - path.append(os.path.join(portage_bin_path,
47 > "ebuild-helpers", "bsd"))
48 > + for x in portage_bin_path:
49 > + path.append(os.path.join(x,
50 > "ebuild-helpers", "bsd"))
51 > - path.append(os.path.join(portage_bin_path, "ebuild-helpers"))
52 > + for x in portage_bin_path:
53 > + path.append(os.path.join(x, "ebuild-helpers"))
54 > path.extend(prerootpath)
55 >
56 > for prefix in prefixes:
57
58 LGTM
59
60 --
61 Brian Dolbec <dolsen>