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 13D5D138010 for ; Fri, 29 Mar 2013 21:44:00 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 9B3ECE07B6; Fri, 29 Mar 2013 21:43:59 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id DBB54E0A0B for ; Fri, 29 Mar 2013 21:43:58 +0000 (UTC) Received: from hornbill.gentoo.org (hornbill.gentoo.org [94.100.119.163]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 0306633BE0E for ; Fri, 29 Mar 2013 21:43:58 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id 99B8CE4073 for ; Fri, 29 Mar 2013 21:43:56 +0000 (UTC) From: "Zac Medico" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Zac Medico" Message-ID: <1364593377.da471fa9a131f3bb99941ef315f187b8772a3d7f.zmedico@gentoo> Subject: [gentoo-commits] proj/portage:master commit in: pym/portage/repository/ X-VCS-Repository: proj/portage X-VCS-Files: pym/portage/repository/config.py X-VCS-Directories: pym/portage/repository/ X-VCS-Committer: zmedico X-VCS-Committer-Name: Zac Medico X-VCS-Revision: da471fa9a131f3bb99941ef315f187b8772a3d7f X-VCS-Branch: master Date: Fri, 29 Mar 2013 21:43:56 +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: 847733d2-2077-486a-b459-bce06a963d7b X-Archives-Hash: 196d255339ede8a1045b1445af7b863b commit: da471fa9a131f3bb99941ef315f187b8772a3d7f Author: Michał Górny gentoo org> AuthorDate: Fri Mar 29 09:23:47 2013 +0000 Commit: Zac Medico gentoo org> CommitDate: Fri Mar 29 21:42:57 2013 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=da471fa9 Support overriding repo-name from layout.conf. Consider this an undocumented and unsupported feature which will make my life much easier. And decrease the amount of repo_name changes committed by mistake. See bug #433561. --- pym/portage/repository/config.py | 8 ++++++++ 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/pym/portage/repository/config.py b/pym/portage/repository/config.py index adeab18..969fce4 100644 --- a/pym/portage/repository/config.py +++ b/pym/portage/repository/config.py @@ -180,6 +180,12 @@ class RepoConfig(object): # them the ability to do incremental overrides self.aliases = layout_data['aliases'] + tuple(aliases) + if layout_data['repo-name']: + # allow layout.conf to override repository name + # useful when having two copies of the same repo enabled + # to avoid modifying profiles/repo_name in one of them + self.name = layout_data['repo-name'] + for value in ('allow-missing-manifest', 'allow-provide-virtual', 'cache-formats', 'create-manifest', 'disable-manifest', 'manifest-hashes', @@ -748,6 +754,8 @@ def parse_layout_conf(repo_location, repo_name=None): data['thin-manifest'] = layout_data.get('thin-manifests', 'false').lower() \ == 'true' + data['repo-name'] = _gen_valid_repo(layout_data.get('repo-name', '')) + manifest_policy = layout_data.get('use-manifests', 'strict').lower() data['allow-missing-manifest'] = manifest_policy != 'strict' data['create-manifest'] = manifest_policy != 'false'