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 1Q3csb-0002Xx-LF for garchives@archives.gentoo.org; Sat, 26 Mar 2011 23:26:49 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id C8F75E06BF; Sat, 26 Mar 2011 23:26:42 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 9996AE06BF for ; Sat, 26 Mar 2011 23:26:42 +0000 (UTC) Received: from pelican.gentoo.org (unknown [66.219.59.40]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 259611B4128 for ; Sat, 26 Mar 2011 23:26:42 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by pelican.gentoo.org (Postfix) with ESMTP id 9071E8006A for ; Sat, 26 Mar 2011 23:26:41 +0000 (UTC) From: "Zac Medico" To: gentoo-commits@lists.gentoo.org Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Zac Medico" Message-ID: Subject: [gentoo-commits] proj/portage:master commit in: pym/portage/dbapi/ X-VCS-Repository: proj/portage X-VCS-Files: pym/portage/dbapi/_MergeProcess.py pym/portage/dbapi/vartree.py X-VCS-Directories: pym/portage/dbapi/ X-VCS-Committer: zmedico X-VCS-Committer-Name: Zac Medico X-VCS-Revision: dfc5e174bdbcb21a16c5d5bb464ea4fc43b456a5 Date: Sat, 26 Mar 2011 23:26:41 +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: X-Archives-Hash: 4890ff2d486e0cf7accd5b9e6cf8175d commit: dfc5e174bdbcb21a16c5d5bb464ea4fc43b456a5 Author: Zac Medico gentoo org> AuthorDate: Sat Mar 26 23:25:15 2011 +0000 Commit: Zac Medico gentoo org> CommitDate: Sat Mar 26 23:25:15 2011 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/portage.git;a= =3Dcommit;h=3Ddfc5e174 MergeProcess: query blockers in the main process Metadata cache queries may not work for some databases from within a subprocess. For example, sqlite is known to misbehave. --- pym/portage/dbapi/_MergeProcess.py | 8 +++++++- pym/portage/dbapi/vartree.py | 4 +--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/pym/portage/dbapi/_MergeProcess.py b/pym/portage/dbapi/_Merg= eProcess.py index 43111cb..ea7c3e6 100644 --- a/pym/portage/dbapi/_MergeProcess.py +++ b/pym/portage/dbapi/_MergeProcess.py @@ -114,9 +114,15 @@ class MergeProcess(SpawnProcess): elog_reader_fd, elog_writer_fd =3D os.pipe() fcntl.fcntl(elog_reader_fd, fcntl.F_SETFL, fcntl.fcntl(elog_reader_fd, fcntl.F_GETFL) | os.O_NONBLOCK) + blockers =3D None + if self.blockers is not None: + # Query blockers in the main process, since metadata cache + # queries may not work for some databases from within a + # subprocess. For example, sqlite is known to misbehave. + blockers =3D self.blockers() mylink =3D self.dblink(self.mycat, self.mypkg, settings=3Dself.setting= s, treetype=3Dself.treetype, vartree=3Dself.vartree, - blockers=3Dself.blockers, scheduler=3Dself.scheduler, + blockers=3Dblockers, scheduler=3Dself.scheduler, pipe=3Delog_writer_fd) fd_pipes[elog_writer_fd] =3D elog_writer_fd self._elog_reg_id =3D self.scheduler.register(elog_reader_fd, diff --git a/pym/portage/dbapi/vartree.py b/pym/portage/dbapi/vartree.py index 4be783d..45b5a69 100644 --- a/pym/portage/dbapi/vartree.py +++ b/pym/portage/dbapi/vartree.py @@ -3076,9 +3076,7 @@ class dblink(object): return 1 =20 # check for package collisions - blockers =3D None - if self._blockers is not None: - blockers =3D self._blockers() + blockers =3D self._blockers if blockers is None: blockers =3D [] collisions, plib_collisions =3D \