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 88F601384B4 for ; Tue, 8 Dec 2015 20:57:55 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 43F9E21C034; Tue, 8 Dec 2015 20:57:54 +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 CD60F21C034 for ; Tue, 8 Dec 2015 20:57:53 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 7340234073B for ; Tue, 8 Dec 2015 20:57:51 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id BDE6FA1B for ; Tue, 8 Dec 2015 20:57:49 +0000 (UTC) From: "Arfrever Frehtes Taifersar Arahesis" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Arfrever Frehtes Taifersar Arahesis" Message-ID: <1449608177.fb4d1f4ff710c7d7c848cf5ed4a7232bc1dd1e19.arfrever@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: arfrever X-VCS-Committer-Name: Arfrever Frehtes Taifersar Arahesis X-VCS-Revision: fb4d1f4ff710c7d7c848cf5ed4a7232bc1dd1e19 X-VCS-Branch: master Date: Tue, 8 Dec 2015 20:57:49 +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: 0c054880-680c-411f-8b43-f83910a86e8b X-Archives-Hash: f8d3747e962ee18ca3d583717f04ee86 commit: fb4d1f4ff710c7d7c848cf5ed4a7232bc1dd1e19 Author: Arfrever Frehtes Taifersar Arahesis Apache Org> AuthorDate: Tue Dec 8 20:56:17 2015 +0000 Commit: Arfrever Frehtes Taifersar Arahesis apache org> CommitDate: Tue Dec 8 20:56:17 2015 +0000 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=fb4d1f4f ebuild: Rename some variables. bin/ebuild | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/bin/ebuild b/bin/ebuild index 2c42771..1afad25 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). -ebuild_portdir = os.path.realpath( +repo_location = os.path.realpath( os.path.dirname(os.path.dirname(os.path.dirname(ebuild)))) -ebuild = os.path.join(ebuild_portdir, *ebuild.split(os.path.sep)[-3:]) +ebuild = os.path.join(repo_location, *ebuild.split(os.path.sep)[-3:]) vdb_path = os.path.realpath(os.path.join(portage.settings['EROOT'], VDB_PATH)) -myrepo = None -if ebuild_portdir != vdb_path: - myrepo = portage.repository.config._read_repo_name(ebuild_portdir) - if myrepo is None: +repo_name = None +if repo_location != vdb_path: + repo_name = portage.repository.config._read_repo_name(repo_location) + if repo_name is None: err("Repository located in %r has no repository name set in %r or in 'repo-name' attribute in %r" % - (ebuild_portdir, os.path.join(ebuild_portdir, REPO_NAME_LOC), os.path.join(ebuild_portdir, "metadata", "layout.conf"))) + (repo_location, os.path.join(repo_location, REPO_NAME_LOC), os.path.join(repo_location, "metadata", "layout.conf"))) # Make sure that portdb.findname() returns the correct ebuild. - if ebuild_portdir not in portage.portdb.porttrees: - print("Appending repository '%s' located in '%s' to configuration of repositories" % (myrepo, ebuild_portdir)) + if repo_location not in portage.portdb.porttrees: + print("Appending repository '%s' located in '%s' to configuration of repositories" % (repo_name, repo_location)) tmp_conf_file = io.StringIO(textwrap.dedent(""" [%s] location = %s - """ % (myrepo, ebuild_portdir))) + """ % (repo_name, repo_location))) 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=myrepo) + portage_ebuild = portage.db[portage.root][mytree].dbapi.findname(cpv, myrepo=repo_name) 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=myrepo) + portage_ebuild = portage.portdb.findname(cpv, myrepo=repo_name) 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, ebuild_portdir)[0] is None + portage.portdb._pull_valid_cache(cpv, ebuild, repo_location)[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=myrepo))) + cpv, Package.metadata_keys, myrepo=repo_name))) except PortageKeyError: # aux_get failure, message should have been shown on stderr. sys.exit(1)