Gentoo Archives: gentoo-commits

From: "Michał Górny" <mgorny@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/portage:master commit in: pym/portage/package/ebuild/
Date: Sat, 27 Jan 2018 10:20:01
Message-Id: 1517048370.28ab348d318e26b32073eb910756ec9c0727042b.mgorny@gentoo
1 commit: 28ab348d318e26b32073eb910756ec9c0727042b
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Sat Jan 27 08:53:59 2018 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Sat Jan 27 10:19:30 2018 +0000
6 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=28ab348d
7
8 prepare_build_dirs: Fix duplicate override of DISTDIR for 'ebuild'
9
10 Fix the duplicate override of DISTDIR that happens when using
11 the 'ebuild' tool to run ebuilds. In this case, both the 'config'
12 code and the 'prepare_build_dirs' code attempt to replace DISTDIR,
13 and the shadow distdir symlinks end up pointing to themselves.
14
15 As suggested by Zac Medico, after removing this override DISTDIR
16 in settings will always be the real directory, so there is no need
17 for a PORTAGE_ACTUAL_DISTDIR check here.
18
19 Reviewed-by: Zac Medico <zmedico <AT> gentoo.org>
20
21 pym/portage/package/ebuild/prepare_build_dirs.py | 4 +---
22 1 file changed, 1 insertion(+), 3 deletions(-)
23
24 diff --git a/pym/portage/package/ebuild/prepare_build_dirs.py b/pym/portage/package/ebuild/prepare_build_dirs.py
25 index 16afc3f98..21e2aa87c 100644
26 --- a/pym/portage/package/ebuild/prepare_build_dirs.py
27 +++ b/pym/portage/package/ebuild/prepare_build_dirs.py
28 @@ -412,9 +412,7 @@ def _prepare_fake_filesdir(settings):
29
30 def _prepare_fake_distdir(settings, alist):
31 orig_distdir = settings["DISTDIR"]
32 - settings["PORTAGE_ACTUAL_DISTDIR"] = orig_distdir
33 - edpath = settings["DISTDIR"] = \
34 - os.path.join(settings["PORTAGE_BUILDDIR"], "distdir")
35 + edpath = os.path.join(settings["PORTAGE_BUILDDIR"], "distdir")
36 portage.util.ensure_dirs(edpath, gid=portage_gid, mode=0o755)
37
38 # Remove any unexpected files or directories.