From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id B5FBA1381F1 for ; Fri, 26 Jan 2018 14:59:11 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id DC0B3E0973; Fri, 26 Jan 2018 14:59:10 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id BE0CAE0973 for ; Fri, 26 Jan 2018 14:59:10 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id C7AC0335C2F for ; Fri, 26 Jan 2018 14:59:08 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 10E7A126 for ; Fri, 26 Jan 2018 14:59:07 +0000 (UTC) From: "Michał Górny" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Michał Górny" Message-ID: <1516978739.8aa99e78bb89615bb25044183e160a7bf7facc2d.mgorny@gentoo> Subject: [gentoo-commits] proj/portage:master commit in: pym/portage/package/ebuild/ X-VCS-Repository: proj/portage X-VCS-Files: pym/portage/package/ebuild/config.py X-VCS-Directories: pym/portage/package/ebuild/ X-VCS-Committer: mgorny X-VCS-Committer-Name: Michał Górny X-VCS-Revision: 8aa99e78bb89615bb25044183e160a7bf7facc2d X-VCS-Branch: master Date: Fri, 26 Jan 2018 14:59:07 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 697e754e-3c87-467e-a1b2-328cc8d7d85a X-Archives-Hash: bd98ccfdb7d7c3f5c97577a108938900 commit: 8aa99e78bb89615bb25044183e160a7bf7facc2d Author: Michał Górny gentoo org> AuthorDate: Thu Jan 25 08:29:07 2018 +0000 Commit: Michał Górny gentoo org> CommitDate: Fri Jan 26 14:58:59 2018 +0000 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=8aa99e78 portage.package.ebuild.config: Override DISTDIR unconditionally Ensure that DISTDIR is always defined to the path to the shadow directory. This ensures that PMS rules for consistent value are followed, and that no global scope calls should be able to access the distfile directory. This also ensures that global-scope assignments (e.g. in PATCHES) do not work around the shadow directory. Bug: https://bugs.gentoo.org/612972 Reviewed-by: Zac Medico gentoo.org> pym/portage/package/ebuild/config.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/pym/portage/package/ebuild/config.py b/pym/portage/package/ebuild/config.py index d0225a311..5624e86d3 100644 --- a/pym/portage/package/ebuild/config.py +++ b/pym/portage/package/ebuild/config.py @@ -1,4 +1,4 @@ -# Copyright 2010-2016 Gentoo Foundation +# Copyright 2010-2018 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 from __future__ import unicode_literals @@ -2848,6 +2848,15 @@ class config(object): else: raise AssertionError("C locale did not pass the test!") + try: + builddir = mydict["PORTAGE_BUILDDIR"] + distdir = mydict["DISTDIR"] + except KeyError: + pass + else: + mydict["PORTAGE_ACTUAL_DISTDIR"] = distdir + mydict["DISTDIR"] = os.path.join(builddir, "distdir") + return mydict def thirdpartymirrors(self):