From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-commits+bounces-851346-garchives=archives.gentoo.org@lists.gentoo.org>
Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80])
	by finch.gentoo.org (Postfix) with ESMTP id 269231384B4
	for <garchives@archives.gentoo.org>; Sun, 13 Dec 2015 12:58:07 +0000 (UTC)
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id 21CB4E088A;
	Sun, 13 Dec 2015 12:58:04 +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 A16AEE088A
	for <gentoo-commits@lists.gentoo.org>; Sun, 13 Dec 2015 12:58:03 +0000 (UTC)
Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52])
	(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by smtp.gentoo.org (Postfix) with ESMTPS id 3FC71340754
	for <gentoo-commits@lists.gentoo.org>; Sun, 13 Dec 2015 12:58:02 +0000 (UTC)
Received: from localhost.localdomain (localhost [127.0.0.1])
	by oystercatcher.gentoo.org (Postfix) with ESMTP id 74DFD9A1
	for <gentoo-commits@lists.gentoo.org>; Sun, 13 Dec 2015 12:57:59 +0000 (UTC)
From: "Michał Górny" <mgorny@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, "Michał Górny" <mgorny@gentoo.org>
Message-ID: <1449992009.a696a7f98c4945bc9d70313484b39d2e67cd2ba4.mgorny@gentoo>
Subject: [gentoo-commits] proj/portage:master commit in: bin/
X-VCS-Repository: proj/portage
X-VCS-Files: bin/ebuild
X-VCS-Directories: bin/
X-VCS-Committer: mgorny
X-VCS-Committer-Name: Michał Górny
X-VCS-Revision: a696a7f98c4945bc9d70313484b39d2e67cd2ba4
X-VCS-Branch: master
Date: Sun, 13 Dec 2015 12:57:59 +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: 3786187b-7064-43a1-b819-243603523aec
X-Archives-Hash: 8e028ba01966b94429b19dd5c1157bc8

commit:     a696a7f98c4945bc9d70313484b39d2e67cd2ba4
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Sat Dec 12 15:30:36 2015 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Sun Dec 13 07:33:29 2015 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=a696a7f9

Revert "ebuild: Rename some variables."

This reverts commit fb4d1f4ff710c7d7c848cf5ed4a7232bc1dd1e19. The revert
is necessary to make it possible to sanely revert 9e104c4 ("ebuild: Set
PORTAGE_REPOSITORIES instead of deprecated PORTDIR_OVERLAY.")

 bin/ebuild | 28 ++++++++++++++--------------
 1 file changed, 14 insertions(+), 14 deletions(-)

diff --git a/bin/ebuild b/bin/ebuild
index 1afad25..2c42771 100755
--- a/bin/ebuild
+++ b/bin/ebuild
@@ -141,25 +141,25 @@ if not os.path.isabs(ebuild):
 ebuild = portage.normalize_path(ebuild)
 # portdbapi uses the canonical path for the base of the portage tree, but
 # subdirectories of the base can be built from symlinks (like crossdev does).
-repo_location = os.path.realpath(
+ebuild_portdir = os.path.realpath(
 	os.path.dirname(os.path.dirname(os.path.dirname(ebuild))))
-ebuild = os.path.join(repo_location, *ebuild.split(os.path.sep)[-3:])
+ebuild = os.path.join(ebuild_portdir, *ebuild.split(os.path.sep)[-3:])
 vdb_path = os.path.realpath(os.path.join(portage.settings['EROOT'], VDB_PATH))
 
-repo_name = None
-if repo_location != vdb_path:
-	repo_name = portage.repository.config._read_repo_name(repo_location)
-	if repo_name is None:
+myrepo = None
+if ebuild_portdir != vdb_path:
+	myrepo = portage.repository.config._read_repo_name(ebuild_portdir)
+	if myrepo is None:
 		err("Repository located in %r has no repository name set in %r or in 'repo-name' attribute in %r" %
-			(repo_location, os.path.join(repo_location, REPO_NAME_LOC), os.path.join(repo_location, "metadata", "layout.conf")))
+			(ebuild_portdir, os.path.join(ebuild_portdir, REPO_NAME_LOC), os.path.join(ebuild_portdir, "metadata", "layout.conf")))
 
 	# Make sure that portdb.findname() returns the correct ebuild.
-	if repo_location not in portage.portdb.porttrees:
-		print("Appending repository '%s' located in '%s' to configuration of repositories" % (repo_name, repo_location))
+	if ebuild_portdir not in portage.portdb.porttrees:
+		print("Appending repository '%s' located in '%s' to configuration of repositories" % (myrepo, ebuild_portdir))
 		tmp_conf_file = io.StringIO(textwrap.dedent("""
 			[%s]
 			location = %s
-			""" % (repo_name, repo_location)))
+			""" % (myrepo, ebuild_portdir)))
 		repositories = portage.repository.config.load_repository_config(portage.settings, extra_files=[tmp_conf_file])
 		os.environ["PORTAGE_REPOSITORIES"] = repositories.config_string()
 		portage._reset_legacy_globals()
@@ -182,7 +182,7 @@ if ebuild.startswith(vdb_path):
 	mytree = "vartree"
 	pkg_type = "installed"
 
-	portage_ebuild = portage.db[portage.root][mytree].dbapi.findname(cpv, myrepo=repo_name)
+	portage_ebuild = portage.db[portage.root][mytree].dbapi.findname(cpv, myrepo=myrepo)
 
 	if os.path.realpath(portage_ebuild) != ebuild:
 		err('Portage seems to think that %s is at %s' % (cpv, portage_ebuild))
@@ -191,7 +191,7 @@ else:
 	mytree = "porttree"
 	pkg_type = "ebuild"
 
-	portage_ebuild = portage.portdb.findname(cpv, myrepo=repo_name)
+	portage_ebuild = portage.portdb.findname(cpv, myrepo=myrepo)
 
 	if not portage_ebuild or portage_ebuild != ebuild:
 		err('%s: Invalid structure of repository' % (ebuild,))
@@ -238,7 +238,7 @@ build_dir_phases = set(["setup", "unpack", "prepare", "configure", "compile",
 ebuild_changed = False
 if mytree == "porttree" and build_dir_phases.intersection(pargs):
 	ebuild_changed = \
-		portage.portdb._pull_valid_cache(cpv, ebuild, repo_location)[0] is None
+		portage.portdb._pull_valid_cache(cpv, ebuild, ebuild_portdir)[0] is None
 
 tmpsettings = portage.config(clone=portage.settings)
 tmpsettings["PORTAGE_VERBOSE"] = "1"
@@ -271,7 +271,7 @@ if "merge" in pargs and "noauto" in tmpsettings.features:
 try:
 	metadata = dict(zip(Package.metadata_keys,
 		portage.db[portage.settings['EROOT']][mytree].dbapi.aux_get(
-		cpv, Package.metadata_keys, myrepo=repo_name)))
+		cpv, Package.metadata_keys, myrepo=myrepo)))
 except PortageKeyError:
 	# aux_get failure, message should have been shown on stderr.
 	sys.exit(1)