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 0872C139695 for ; Thu, 20 Apr 2017 19:39:36 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id D8947E0D47; Thu, 20 Apr 2017 19:39:32 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id B660CE0CB6 for ; Thu, 20 Apr 2017 19:39:32 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (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 93BAE3413B7 for ; Thu, 20 Apr 2017 19:39:31 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 8D95C743A for ; Thu, 20 Apr 2017 19:39:29 +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: <1492717140.2366c903bab8f44463106e878f4e0c1ba81f42f8.zmedico@gentoo> Subject: [gentoo-commits] proj/portage:master commit in: pym/_emerge/ X-VCS-Repository: proj/portage X-VCS-Files: pym/_emerge/depgraph.py X-VCS-Directories: pym/_emerge/ X-VCS-Committer: zmedico X-VCS-Committer-Name: Zac Medico X-VCS-Revision: 2366c903bab8f44463106e878f4e0c1ba81f42f8 X-VCS-Branch: master Date: Thu, 20 Apr 2017 19:39:29 +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: f60b2295-4f7e-4fcb-b9ed-257471ef5a18 X-Archives-Hash: ab67fccaa57556dc06b75b22a577f005 commit: 2366c903bab8f44463106e878f4e0c1ba81f42f8 Author: Zac Medico gentoo org> AuthorDate: Wed Apr 19 04:17:50 2017 +0000 Commit: Zac Medico gentoo org> CommitDate: Thu Apr 20 19:39:00 2017 +0000 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=2366c903 depgraph._in_blocker_conflict: call _validate_blockers if needed (bug 615982) Sometimes _complete_graph calls _slot_operator_update_probe, which sometimes calls _in_blocker_conflict. This case occurs infrequently, so call _validate_blockers only if needed. Fixes: a83bb83909c5 ("depgraph: trigger slot operator rebuilds via _complete_graph (bug 614390)") X-Gentoo-bug: 615982 X-Gentoo-bug-url: https://bugs.gentoo.org/show_bug.cgi?id=615982 Acked-by: Brian Dolbec gentoo.org> pym/_emerge/depgraph.py | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/pym/_emerge/depgraph.py b/pym/_emerge/depgraph.py index 3232816d5..e1119af3c 100644 --- a/pym/_emerge/depgraph.py +++ b/pym/_emerge/depgraph.py @@ -2176,9 +2176,9 @@ class depgraph(object): only works after the _validate_blockers method has been called. """ - if self._dynamic_config._blocked_pkgs is None: - raise AssertionError( - '_in_blocker_conflict called before _validate_blockers') + if (self._dynamic_config._blocked_pkgs is None + and not self._validate_blockers()): + raise self._unknown_internal_error() if pkg in self._dynamic_config._blocked_pkgs: return True @@ -6728,7 +6728,14 @@ class depgraph(object): packages within the graph. If necessary, create hard deps to ensure correct merge order such that mutually blocking packages are never installed simultaneously. Also add runtime blockers from all installed - packages if any of them haven't been added already (bug 128809).""" + packages if any of them haven't been added already (bug 128809). + + Normally, this method is called only after the graph is complete, and + after _solve_non_slot_operator_slot_conflicts has had an opportunity + to solve slot conflicts (possibly removing some blockers). It can also + be called earlier, in order to get a preview of the blocker data, but + then it needs to be called again after the graph is complete. + """ # The _in_blocker_conflict method needs to assert that this method # has been called before it, by checking that it is not None.