From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 70D161382C5 for ; Mon, 23 Apr 2018 00:08:58 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 6DE0CE0848; Mon, 23 Apr 2018 00:08:55 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 38916E0805 for ; Mon, 23 Apr 2018 00:08:55 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id C2018335C43 for ; Mon, 23 Apr 2018 00:08:52 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 6360327C for ; Mon, 23 Apr 2018 00:08:51 +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: <1524441995.db4dca876cdb004b12a944f5323a51bc4bbde770.zmedico@gentoo> Subject: [gentoo-commits] proj/portage:master commit in: pym/portage/package/ebuild/, pym/_emerge/ X-VCS-Repository: proj/portage X-VCS-Files: pym/_emerge/EbuildBuild.py pym/portage/package/ebuild/doebuild.py X-VCS-Directories: pym/portage/package/ebuild/ pym/_emerge/ X-VCS-Committer: zmedico X-VCS-Committer-Name: Zac Medico X-VCS-Revision: db4dca876cdb004b12a944f5323a51bc4bbde770 X-VCS-Branch: master Date: Mon, 23 Apr 2018 00:08:51 +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: 5cdb736a-13f7-4e16-9896-eff808ffa3a7 X-Archives-Hash: 22d6a57f9f799120fa4fc005bcd06ea9 commit: db4dca876cdb004b12a944f5323a51bc4bbde770 Author: Zac Medico gentoo org> AuthorDate: Mon Apr 23 00:04:29 2018 +0000 Commit: Zac Medico gentoo org> CommitDate: Mon Apr 23 00:06:35 2018 +0000 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=db4dca87 EbuildBuild._start(): fix event loop recursion (bug 653844) Use async_aux_get to fetch SRC_URI metadata (it's not cached in self.pkg.metadata because some packages have an extremely large SRC_URI value). Bug: https://bugs.gentoo.org/653844 pym/_emerge/EbuildBuild.py | 19 ++++++++++++++----- pym/portage/package/ebuild/doebuild.py | 6 ++++-- 2 files changed, 18 insertions(+), 7 deletions(-) diff --git a/pym/_emerge/EbuildBuild.py b/pym/_emerge/EbuildBuild.py index 9d4afd0ea..8ad8bcae9 100644 --- a/pym/_emerge/EbuildBuild.py +++ b/pym/_emerge/EbuildBuild.py @@ -35,23 +35,32 @@ class EbuildBuild(CompositeTask): ("_build_dir", "_buildpkg", "_ebuild_path", "_issyspkg", "_tree") def _start(self): - - pkg = self.pkg - settings = self.settings - if not self.opts.fetchonly: - rval = _check_temp_dir(settings) + rval = _check_temp_dir(self.settings) if rval != os.EX_OK: self.returncode = rval self._current_task = None self._async_wait() return + # First get the SRC_URI metadata (it's not cached in self.pkg.metadata + # because some packages have an extremely large SRC_URI value). + self._start_task( + AsyncTaskFuture( + future=self.pkg.root_config.trees["porttree"].dbapi.\ + async_aux_get(self.pkg.cpv, ["SRC_URI"], myrepo=self.pkg.repo)), + self._start_with_metadata) + + def _start_with_metadata(self, aux_get_task): + self._assert_current(aux_get_task) + pkg = self.pkg + settings = self.settings root_config = pkg.root_config tree = "porttree" self._tree = tree portdb = root_config.trees[tree].dbapi settings.setcpv(pkg) + settings.configdict["pkg"]["SRC_URI"], = aux_get_task.future.result() settings.configdict["pkg"]["EMERGE_FROM"] = "ebuild" if self.opts.buildpkgonly: settings.configdict["pkg"]["MERGE_TYPE"] = "buildonly" diff --git a/pym/portage/package/ebuild/doebuild.py b/pym/portage/package/ebuild/doebuild.py index 3c8414387..0dabafeb7 100644 --- a/pym/portage/package/ebuild/doebuild.py +++ b/pym/portage/package/ebuild/doebuild.py @@ -450,8 +450,10 @@ def doebuild_environment(myebuild, mydo, myroot=None, settings=None, if hasattr(mydbapi, "getFetchMap") and \ ("A" not in mysettings.configdict["pkg"] or \ "AA" not in mysettings.configdict["pkg"]): - src_uri, = mydbapi.aux_get(mysettings.mycpv, - ["SRC_URI"], mytree=mytree) + src_uri = mysettings.configdict["pkg"].get("SRC_URI") + if src_uri is None: + src_uri, = mydbapi.aux_get(mysettings.mycpv, + ["SRC_URI"], mytree=mytree) metadata = { "EAPI" : eapi, "SRC_URI" : src_uri,