From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-commits+bounces-993756-garchives=archives.gentoo.org@lists.gentoo.org>
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 45CC4138AE9
	for <garchives@archives.gentoo.org>; Fri, 29 Dec 2017 11:45:17 +0000 (UTC)
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id 4BC972BC008;
	Fri, 29 Dec 2017 11:45:15 +0000 (UTC)
Received: from smtp.gentoo.org (smtp.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 254B52BC008
	for <gentoo-commits@lists.gentoo.org>; Fri, 29 Dec 2017 11:45:14 +0000 (UTC)
Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84])
	(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 0BDE2340CC0
	for <gentoo-commits@lists.gentoo.org>; Fri, 29 Dec 2017 11:45:13 +0000 (UTC)
Received: from localhost.localdomain (localhost [IPv6:::1])
	by oystercatcher.gentoo.org (Postfix) with ESMTP id 680BAAFCF
	for <gentoo-commits@lists.gentoo.org>; Fri, 29 Dec 2017 11:45:10 +0000 (UTC)
From: "Fabian Groffen" <grobian@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Content-Transfer-Encoding: 8bit
Content-type: text/plain; charset=UTF-8
Reply-To: gentoo-dev@lists.gentoo.org, "Fabian Groffen" <grobian@gentoo.org>
Message-ID: <1514546201.145d84eaf87d95cb0ab581c573aff941fa4fe404.grobian@gentoo>
Subject: [gentoo-commits] proj/portage-utils:master commit in: /
X-VCS-Repository: proj/portage-utils
X-VCS-Files: main.c
X-VCS-Directories: /
X-VCS-Committer: grobian
X-VCS-Committer-Name: Fabian Groffen
X-VCS-Revision: 145d84eaf87d95cb0ab581c573aff941fa4fe404
X-VCS-Branch: master
Date: Fri, 29 Dec 2017 11:45:10 +0000 (UTC)
Precedence: bulk
List-Post: <mailto:gentoo-commits@lists.gentoo.org>
List-Help: <mailto:gentoo-commits+help@lists.gentoo.org>
List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org>
List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org>
List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org>
X-BeenThere: gentoo-commits@lists.gentoo.org
X-Archives-Salt: 847c1490-05b9-48ba-87dc-01cdd69ef2db
X-Archives-Hash: 79e9edc4ba2ac47d19cdbad348654ff7

commit:     145d84eaf87d95cb0ab581c573aff941fa4fe404
Author:     Fabian Groffen <grobian <AT> gentoo <DOT> org>
AuthorDate: Fri Dec 29 11:07:26 2017 +0000
Commit:     Fabian Groffen <grobian <AT> gentoo <DOT> org>
CommitDate: Fri Dec 29 11:16:41 2017 +0000
URL:        https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=145d84ea

initialize_portage_env: fix PORTAGE_CONFIGROOT usage

All things on top of PORTAGE_CONFIGROOT need to be relative, so don't
add EPREFIX on top of it.

 main.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/main.c b/main.c
index dea03a8..b118ab8 100644
--- a/main.c
+++ b/main.c
@@ -844,16 +844,16 @@ initialize_portage_env(void)
 	/* figure out where to find our config files */
 	const char *configroot = getenv("PORTAGE_CONFIGROOT");
 	if (!configroot)
-		configroot = "/";
+		configroot = CONFIG_EPREFIX "/";
 
 	/* walk all the stacked profiles */
-	read_portage_profile(configroot, CONFIG_EPREFIX "etc/make.profile", vars_to_read);
-	read_portage_profile(configroot, CONFIG_EPREFIX "etc/portage/make.profile", vars_to_read);
+	read_portage_profile(configroot, "/etc/make.profile", vars_to_read);
+	read_portage_profile(configroot, "/etc/portage/make.profile", vars_to_read);
 
 	/* now read all the config files */
 	read_portage_env_file("", CONFIG_EPREFIX "usr/share/portage/config/make.globals", vars_to_read);
-	read_portage_env_file(configroot, CONFIG_EPREFIX "etc/make.conf", vars_to_read);
-	read_portage_env_file(configroot, CONFIG_EPREFIX "etc/portage/make.conf", vars_to_read);
+	read_portage_env_file(configroot, "/etc/make.conf", vars_to_read);
+	read_portage_env_file(configroot, "/etc/portage/make.conf", vars_to_read);
 
 	/* finally, check the env */
 	for (i = 0; vars_to_read[i].name; ++i) {