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> |