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 E7467138010 for ; Sat, 15 Sep 2012 16:54:06 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 79E71E0662; Sat, 15 Sep 2012 16:53:57 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 3973DE0662 for ; Sat, 15 Sep 2012 16:53:57 +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 73B7F33D0AF for ; Sat, 15 Sep 2012 16:53:56 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id D680AE543F for ; Sat, 15 Sep 2012 16:53:54 +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: <1347728022.50bea0375496f919fc40c586e8308b19f814ba66.zmedico@gentoo> Subject: [gentoo-commits] proj/portage:master commit in: bin/, pym/_emerge/ X-VCS-Repository: proj/portage X-VCS-Files: bin/egencache pym/_emerge/EbuildMetadataPhase.py pym/_emerge/MetadataRegen.py X-VCS-Directories: bin/ pym/_emerge/ X-VCS-Committer: zmedico X-VCS-Committer-Name: Zac Medico X-VCS-Revision: 50bea0375496f919fc40c586e8308b19f814ba66 X-VCS-Branch: master Date: Sat, 15 Sep 2012 16:53:54 +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: c9dd392e-0098-4350-ab3d-23fa3729bedc X-Archives-Hash: 810246c247eca891e37e5fde27e68c57 commit: 50bea0375496f919fc40c586e8308b19f814ba66 Author: Zac Medico gentoo org> AuthorDate: Sat Sep 15 16:53:42 2012 +0000 Commit: Zac Medico gentoo org> CommitDate: Sat Sep 15 16:53:42 2012 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=50bea037 egencache: skip auxdb write if not metadata-trans --- bin/egencache | 4 +++- pym/_emerge/EbuildMetadataPhase.py | 9 ++++++--- pym/_emerge/MetadataRegen.py | 6 ++++-- 3 files changed, 13 insertions(+), 6 deletions(-) diff --git a/bin/egencache b/bin/egencache index 0035674..ec62a8c 100755 --- a/bin/egencache +++ b/bin/egencache @@ -212,9 +212,11 @@ class GenCache(object): else: self._cp_set = None self._cp_missing = set() + write_auxdb = "metadata-transfer" in portdb.settings.features self._regen = MetadataRegen(portdb, cp_iter=cp_iter, consumer=self._metadata_callback, - max_jobs=max_jobs, max_load=max_load) + max_jobs=max_jobs, max_load=max_load, + write_auxdb=write_auxdb) self.returncode = os.EX_OK conf = portdb.repositories.get_repo_for_location(tree) self._trg_caches = tuple(conf.iter_pregenerated_caches( diff --git a/pym/_emerge/EbuildMetadataPhase.py b/pym/_emerge/EbuildMetadataPhase.py index 669b4ae..1ffa1bb 100644 --- a/pym/_emerge/EbuildMetadataPhase.py +++ b/pym/_emerge/EbuildMetadataPhase.py @@ -25,7 +25,7 @@ class EbuildMetadataPhase(SubProcess): """ __slots__ = ("cpv", "eapi_supported", "ebuild_hash", "fd_pipes", - "metadata", "portdb", "repo_path", "settings") + \ + "metadata", "portdb", "repo_path", "settings", "write_auxdb") + \ ("_eapi", "_eapi_lineno", "_raw_metadata",) _file_names = ("ebuild",) @@ -180,8 +180,11 @@ class EbuildMetadataPhase(SubProcess): metadata["_eclasses_"] = {} metadata.pop("INHERITED", None) - self.portdb._write_cache(self.cpv, - self.repo_path, metadata, self.ebuild_hash) + # If called by egencache, this cache write is + # undesirable when metadata-transfer is disabled. + if self.write_auxdb is not False: + self.portdb._write_cache(self.cpv, + self.repo_path, metadata, self.ebuild_hash) else: metadata = {"EAPI": metadata["EAPI"]} self.metadata = metadata diff --git a/pym/_emerge/MetadataRegen.py b/pym/_emerge/MetadataRegen.py index e82015f..234298f 100644 --- a/pym/_emerge/MetadataRegen.py +++ b/pym/_emerge/MetadataRegen.py @@ -10,9 +10,10 @@ from _emerge.PollScheduler import PollScheduler class MetadataRegen(PollScheduler): def __init__(self, portdb, cp_iter=None, consumer=None, - max_jobs=None, max_load=None): + max_jobs=None, max_load=None, write_auxdb=True): PollScheduler.__init__(self, main=True) self._portdb = portdb + self._write_auxdb = write_auxdb self._global_cleanse = False if cp_iter is None: cp_iter = self._iter_every_cp() @@ -84,7 +85,8 @@ class MetadataRegen(PollScheduler): yield EbuildMetadataPhase(cpv=cpv, ebuild_hash=ebuild_hash, portdb=portdb, repo_path=repo_path, - settings=portdb.doebuild_settings) + settings=portdb.doebuild_settings, + write_auxdb=self._write_auxdb) def _keep_scheduling(self): return self._remaining_tasks and not self._terminated_tasks