From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id E9A23138CA2 for ; Tue, 21 Apr 2015 23:20:27 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 5AA3EE08B1; Tue, 21 Apr 2015 23:20:25 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id C1534E08AB for ; Tue, 21 Apr 2015 23:20:23 +0000 (UTC) Received: from big_daddy.dol-sen.ca (S010634bdfa9ecf80.vc.shawcable.net [96.49.31.57]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: dolsen) by smtp.gentoo.org (Postfix) with ESMTPSA id CE6D4340B4C for ; Tue, 21 Apr 2015 23:20:22 +0000 (UTC) Date: Tue, 21 Apr 2015 16:20:19 -0700 From: Brian Dolbec To: gentoo-portage-dev@lists.gentoo.org Subject: Re: [gentoo-portage-dev] [PATCH] _doebuild_path: add fallback for temp PORTAGE_BIN_PATH (bug 547086) Message-ID: <20150421162019.5e89f3e8.dolsen@gentoo.org> In-Reply-To: <1429471630-29167-1-git-send-email-zmedico@gentoo.org> References: <1429471630-29167-1-git-send-email-zmedico@gentoo.org> Organization: Gentoo Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-portage-dev@lists.gentoo.org Reply-to: gentoo-portage-dev@lists.gentoo.org MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Archives-Salt: 70aff702-08a2-4a32-a940-f95374ce6005 X-Archives-Hash: f337eb36c06cd4731dd6de257e2d9c51 On Sun, 19 Apr 2015 12:27:10 -0700 Zac Medico wrote: > X-Gentoo-Bug: 547086 > X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=547086 > --- > pym/portage/package/ebuild/doebuild.py | 19 +++++++++++++------ > 1 file changed, 13 insertions(+), 6 deletions(-) > > diff --git a/pym/portage/package/ebuild/doebuild.py > b/pym/portage/package/ebuild/doebuild.py index 1be83ad..4d926c7 100644 > --- a/pym/portage/package/ebuild/doebuild.py > +++ b/pym/portage/package/ebuild/doebuild.py > @@ -195,7 +195,10 @@ def _doebuild_path(settings, eapi=None): > > # Note: PORTAGE_BIN_PATH may differ from the global constant > # when portage is reinstalling itself. > - portage_bin_path = settings["PORTAGE_BIN_PATH"] > + portage_bin_path = [settings["PORTAGE_BIN_PATH"]] > + if portage_bin_path[0] != portage.const.PORTAGE_BIN_PATH: > + # Add a fallback path for restarting failed builds > (bug 547086) > + > portage_bin_path.append(portage.const.PORTAGE_BIN_PATH) eprefix = > portage.const.EPREFIX prerootpath = [x for x in > settings.get("PREROOTPATH", "").split(":") if x] rootpath = [x for x > in settings.get("ROOTPATH", "").split(":") if x] @@ -210,18 +213,22 > @@ def _doebuild_path(settings, eapi=None): path = overrides > > if "xattr" in settings.features: > - path.append(os.path.join(portage_bin_path, > "ebuild-helpers", "xattr")) > + for x in portage_bin_path: > + path.append(os.path.join(x, > "ebuild-helpers", "xattr")) > if uid != 0 and \ > "unprivileged" in settings.features and \ > "fakeroot" not in settings.features: > - path.append(os.path.join(portage_bin_path, > - "ebuild-helpers", "unprivileged")) > + for x in portage_bin_path: > + path.append(os.path.join(x, > + "ebuild-helpers", "unprivileged")) > > if settings.get("USERLAND", "GNU") != "GNU": > - path.append(os.path.join(portage_bin_path, > "ebuild-helpers", "bsd")) > + for x in portage_bin_path: > + path.append(os.path.join(x, > "ebuild-helpers", "bsd")) > - path.append(os.path.join(portage_bin_path, "ebuild-helpers")) > + for x in portage_bin_path: > + path.append(os.path.join(x, "ebuild-helpers")) > path.extend(prerootpath) > > for prefix in prefixes: LGTM -- Brian Dolbec