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 56F1D138CA3 for ; Sun, 19 Apr 2015 19:27:26 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id D2502E084E; Sun, 19 Apr 2015 19:27:24 +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 70571E0825 for ; Sun, 19 Apr 2015 19:27:24 +0000 (UTC) Received: from localhost.localdomain (ip174-67-205-96.oc.oc.cox.net [174.67.205.96]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: zmedico) by smtp.gentoo.org (Postfix) with ESMTPSA id 23211340C57; Sun, 19 Apr 2015 19:27:23 +0000 (UTC) From: Zac Medico To: gentoo-portage-dev@lists.gentoo.org Cc: Zac Medico Subject: [gentoo-portage-dev] [PATCH] _doebuild_path: add fallback for temp PORTAGE_BIN_PATH (bug 547086) Date: Sun, 19 Apr 2015 12:27:10 -0700 Message-Id: <1429471630-29167-1-git-send-email-zmedico@gentoo.org> X-Mailer: git-send-email 2.3.1 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 X-Archives-Salt: 04698ac5-6ce6-4d7b-8d1d-dc368d723f4e X-Archives-Hash: 7d89f9421341737c6c231cb789551ad9 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: -- 2.3.1