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 1Pm4QD-00072e-JI for garchives@archives.gentoo.org; Sun, 06 Feb 2011 13:12:57 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id D460EE0BC5; Sun, 6 Feb 2011 13:10:15 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id A52EAE0BC3 for ; Sun, 6 Feb 2011 13:10:10 +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 5E8E01B430B for ; Sun, 6 Feb 2011 13:10:10 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by pelican.gentoo.org (Postfix) with ESMTP id CB0298006D for ; Sun, 6 Feb 2011 13:10:09 +0000 (UTC) From: "Thomas Sachau" To: gentoo-commits@lists.gentoo.org Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Thomas Sachau" Message-ID: Subject: [gentoo-commits] proj/portage:multilib commit in: pym/_emerge/ X-VCS-Repository: proj/portage X-VCS-Files: pym/_emerge/depgraph.py X-VCS-Directories: pym/_emerge/ X-VCS-Committer: tommy X-VCS-Committer-Name: Thomas Sachau X-VCS-Revision: f90df89f9053bdad96d61935d704f33239f3fed5 Date: Sun, 6 Feb 2011 13:10:09 +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: dfd6e44e35b326582001b5b192bdd37b commit: f90df89f9053bdad96d61935d704f33239f3fed5 Author: Zac Medico gentoo org> AuthorDate: Fri Feb 4 17:41:30 2011 +0000 Commit: Thomas Sachau gentoo org> CommitDate: Fri Feb 4 17:41:30 2011 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/portage.git;a= =3Dcommit;h=3Df90df89f depgraph: make downgrades trigger complete graph It's common for downgrades to break dependencies, as in bug #353613, so automatically trigger complete graph mode when a downgrade is found. --- pym/_emerge/depgraph.py | 23 +++++++++++++++++++++-- 1 files changed, 21 insertions(+), 2 deletions(-) diff --git a/pym/_emerge/depgraph.py b/pym/_emerge/depgraph.py index 4334a33..f131889 100644 --- a/pym/_emerge/depgraph.py +++ b/pym/_emerge/depgraph.py @@ -3456,8 +3456,27 @@ class depgraph(object): return 1 =20 if "complete" not in self._dynamic_config.myparams: - # Skip this to avoid consuming enough time to disturb users. - return 1 + # Automatically enable complete mode if there are any + # downgrades, since they often break dependencies + # (like in bug #353613). + have_downgrade =3D False + for node in self._dynamic_config.digraph: + if not isinstance(node, Package) or \ + node.operation !=3D "merge": + continue + vardb =3D self._frozen_config.roots[ + node.root].trees["vartree"].dbapi + inst_pkg =3D vardb.match_pkgs(node.slot_atom) + if inst_pkg and inst_pkg[0] > node: + have_downgrade =3D True + break + + if have_downgrade: + self._dynamic_config.myparams["complete"] =3D True + else: + # Skip complete graph mode, in order to avoid consuming + # enough time to disturb users. + return 1 =20 self._load_vdb() =20