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 CF8381389E2 for ; Fri, 26 Dec 2014 05:00:06 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 612CCE0A64; Fri, 26 Dec 2014 05:00:03 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 4C581E0A5D for ; Fri, 26 Dec 2014 05:00:02 +0000 (UTC) Received: from localhost.localdomain (67-203-132-147.static-ip.telepacific.net [67.203.132.147]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: zmedico) by smtp.gentoo.org (Postfix) with ESMTPSA id 30FB933FAAE; Fri, 26 Dec 2014 05:00:01 +0000 (UTC) From: Zac Medico To: gentoo-portage-dev@lists.gentoo.org Cc: Zac Medico Subject: [gentoo-portage-dev] [PATCH] Solve more slot-operator conflicts (531656) Date: Thu, 25 Dec 2014 20:59:39 -0800 Message-Id: <1419569979-17935-1-git-send-email-zmedico@gentoo.org> X-Mailer: git-send-email 2.0.5 Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-portage-dev@lists.gentoo.org Reply-to: gentoo-portage-dev@lists.gentoo.org X-Archives-Salt: 5891444d-d805-442a-aaad-520260f03462 X-Archives-Hash: 66be3ce8bdd4929c578c3708bc958638 Add some heuristics to handle slot conflicts triggered by interaction of slot-operator dependencies with dependencies like those of labgl: ocaml:= || ( labltk 1 and + avail_pkg < slot_matches[-1] and + not downgrade_probe(avail_pkg)): + # If a downgrade is not desirable, then avoid a + # choice that pulls in a lower version involved + # in a slot conflict (bug #531656). + conflict_downgrade = True + if atom.use: avail_pkg_use = mydbapi_match_pkgs(atom) if not avail_pkg_use: @@ -450,6 +462,8 @@ def dep_zapdeps(unreduced, reduced, myroot, use_binaries=0, trees=None): unsat_use_installed.append(this_choice) else: unsat_use_non_installed.append(this_choice) + elif conflict_downgrade: + other.append(this_choice) else: all_in_graph = True for atom in atoms: diff --git a/pym/portage/tests/resolver/test_or_choices.py b/pym/portage/tests/resolver/test_or_choices.py index 4aae0b2..3c02dfd 100644 --- a/pym/portage/tests/resolver/test_or_choices.py +++ b/pym/portage/tests/resolver/test_or_choices.py @@ -262,3 +262,81 @@ class OrChoicesTestCase(TestCase): test_case.fail_msg) finally: playground.cleanup() + + def testConflictMissedUpdate(self): + + ebuilds = { + "dev-lang/ocaml-4.02.1" : { + "EAPI": "5", + "SLOT": "0/4.02.1", + }, + + "dev-lang/ocaml-4.01.0" : { + "EAPI": "5", + "SLOT": "0/4.01.0", + }, + + "dev-ml/lablgl-1.05" : { + "EAPI": "5", + "DEPEND": (">=dev-lang/ocaml-3.10.2:= " + "|| ( dev-ml/labltk:= =dev-lang/ocaml-3.10.2:= " + "|| ( dev-ml/labltk:= =dev-lang/ocaml-4.02:=", + "RDEPEND": ">=dev-lang/ocaml-4.02:=", + }, + } + + installed = { + "dev-lang/ocaml-4.01.0" : { + "EAPI": "5", + "SLOT": "0/4.01.0", + }, + + "dev-ml/lablgl-1.05" : { + "EAPI": "5", + "DEPEND": (">=dev-lang/ocaml-3.10.2:0/4.01.0= " + "|| ( dev-ml/labltk:= =dev-lang/ocaml-3.10.2:0/4.01.0= " + "|| ( dev-ml/labltk:=