aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2018-01-27 09:53:59 +0100
committerMichał Górny <mgorny@gentoo.org>2018-01-27 11:19:30 +0100
commit28ab348d318e26b32073eb910756ec9c0727042b (patch)
tree2ded52ee65d653a8689c341bf2b531578b2a5ad7
parent_emerge.Ebuild*: delay creating DISTDIR shadow until src_unpack (diff)
downloadportage-28ab348d.tar.gz
portage-28ab348d.tar.bz2
portage-28ab348d.zip
prepare_build_dirs: Fix duplicate override of DISTDIR for 'ebuild'
Fix the duplicate override of DISTDIR that happens when using the 'ebuild' tool to run ebuilds. In this case, both the 'config' code and the 'prepare_build_dirs' code attempt to replace DISTDIR, and the shadow distdir symlinks end up pointing to themselves. As suggested by Zac Medico, after removing this override DISTDIR in settings will always be the real directory, so there is no need for a PORTAGE_ACTUAL_DISTDIR check here. Reviewed-by: Zac Medico <zmedico@gentoo.org>
-rw-r--r--pym/portage/package/ebuild/prepare_build_dirs.py4
1 files changed, 1 insertions, 3 deletions
diff --git a/pym/portage/package/ebuild/prepare_build_dirs.py b/pym/portage/package/ebuild/prepare_build_dirs.py
index 16afc3f98..21e2aa87c 100644
--- a/pym/portage/package/ebuild/prepare_build_dirs.py
+++ b/pym/portage/package/ebuild/prepare_build_dirs.py
@@ -412,9 +412,7 @@ def _prepare_fake_filesdir(settings):
def _prepare_fake_distdir(settings, alist):
orig_distdir = settings["DISTDIR"]
- settings["PORTAGE_ACTUAL_DISTDIR"] = orig_distdir
- edpath = settings["DISTDIR"] = \
- os.path.join(settings["PORTAGE_BUILDDIR"], "distdir")
+ edpath = os.path.join(settings["PORTAGE_BUILDDIR"], "distdir")
portage.util.ensure_dirs(edpath, gid=portage_gid, mode=0o755)
# Remove any unexpected files or directories.