From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1Rc74O-00013r-8i for garchives@archives.gentoo.org; Sun, 18 Dec 2011 03:05:48 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 4BEE421C071; Sun, 18 Dec 2011 03:05:41 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 0D8A221C071 for ; Sun, 18 Dec 2011 03:05:40 +0000 (UTC) Received: from pelican.gentoo.org (unknown [66.219.59.40]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 542BD1B4002 for ; Sun, 18 Dec 2011 03:05:40 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by pelican.gentoo.org (Postfix) with ESMTP id 72C408003C for ; Sun, 18 Dec 2011 03:05:39 +0000 (UTC) From: "Arfrever Frehtes Taifersar Arahesis" To: gentoo-commits@lists.gentoo.org Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Arfrever Frehtes Taifersar Arahesis" Message-ID: <10246cd535f909dda8bd05de617c32d2b8a56b4a.arfrever@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: arfrever X-VCS-Committer-Name: Arfrever Frehtes Taifersar Arahesis X-VCS-Revision: 10246cd535f909dda8bd05de617c32d2b8a56b4a Date: Sun, 18 Dec 2011 03:05:39 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: quoted-printable X-Archives-Salt: a3a27550-21c7-493b-a92a-ebf303d66fb6 X-Archives-Hash: 99029f673f75b657354daf862b865d49 commit: 10246cd535f909dda8bd05de617c32d2b8a56b4a Author: Arfrever Frehtes Taifersar Arahesis Gentoo Org> AuthorDate: Sun Dec 18 03:01:31 2011 +0000 Commit: Arfrever Frehtes Taifersar Arahesis gentoo org> CommitDate: Sun Dec 18 03:01:31 2011 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/portage.git;a= =3Dcommit;h=3D10246cd5 Parse layout.conf files in portage.repository.config.RepoConfig.__init__(= ) instead of portage.repository.config.RepoConfigLoader.__init__(). --- pym/portage/repository/config.py | 56 ++++++++++++++++++--------------= ----- 1 files changed, 27 insertions(+), 29 deletions(-) diff --git a/pym/portage/repository/config.py b/pym/portage/repository/co= nfig.py index 0222253..1cc66dd 100644 --- a/pym/portage/repository/config.py +++ b/pym/portage/repository/config.py @@ -125,6 +125,33 @@ class RepoConfig(object): self.portage1_profiles =3D True self.portage1_profiles_compat =3D False =20 + # Parse layout.conf. + if self.location: + layout_filename =3D os.path.join(self.location, "metadata", "layout.c= onf") + layout_data =3D parse_layout_conf(self.location, self.name)[0] + + # layout.conf masters may be overridden here if we have a masters + # setting from the user's repos.conf + if self.masters is None: + self.masters =3D layout_data['masters'] + + if layout_data['aliases']: + aliases =3D self.aliases + if aliases is None: + aliases =3D () + # repos.conf aliases come after layout.conf aliases, giving + # them the ability to do incremental overrides + self.aliases =3D layout_data['aliases'] + tuple(aliases) + + for value in ('allow-missing-manifest', 'cache-formats', + 'create-manifest', 'disable-manifest', 'manifest-hashes', + 'sign-manifest', 'thin-manifest', 'update-changelog'): + setattr(self, value.lower().replace("-", "_"), layout_data[value]) + + self.portage1_profiles =3D any(x.startswith("portage-1") \ + for x in layout_data['profile-formats']) + self.portage1_profiles_compat =3D layout_data['profile-formats'] =3D=3D= ('portage-1-compat',) + def iter_pregenerated_caches(self, auxdbkeys, readonly=3DTrue, force=3D= False): """ Reads layout.conf cache-formats from left to right and yields cache @@ -412,35 +439,6 @@ class RepoConfigLoader(object): for repo in prepos.values() if repo.location is not None and repo.missing_repo_name) =20 - #Parse layout.conf and read masters key. - for repo in prepos.values(): - if not repo.location: - continue - layout_filename =3D os.path.join(repo.location, "metadata", "layout.c= onf") - layout_data, layout_errors =3D parse_layout_conf(repo.location, repo.= name) - - # layout.conf masters may be overridden here if we have a masters - # setting from the user's repos.conf - if repo.masters is None: - repo.masters =3D layout_data['masters'] - - if layout_data['aliases']: - aliases =3D repo.aliases - if aliases is None: - aliases =3D () - # repos.conf aliases come after layout.conf aliases, giving - # them the ability to do incremental overrrides - repo.aliases =3D layout_data['aliases'] + tuple(aliases) - - for value in ('allow-missing-manifest', 'cache-formats', - 'create-manifest', 'disable-manifest', 'manifest-hashes', - 'sign-manifest', 'thin-manifest', 'update-changelog'): - setattr(repo, value.lower().replace("-", "_"), layout_data[value]) - - repo.portage1_profiles =3D any(x.startswith("portage-1") \ - for x in layout_data['profile-formats']) - repo.portage1_profiles_compat =3D layout_data['profile-formats'] =3D=3D= ('portage-1-compat',) - #Take aliases into account. new_prepos =3D {} for repo_name, repo in prepos.items():