public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] proj/portage:2.1.9 commit in: pym/portage/tests/resolver/
@ 2011-02-14  4:31 Zac Medico
  0 siblings, 0 replies; 27+ messages in thread
From: Zac Medico @ 2011-02-14  4:31 UTC (permalink / raw
  To: gentoo-commits

commit:     648d2f6a14cdd934865e420faa06a9b271061be8
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Sun Feb 13 13:00:28 2011 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Mon Feb 14 04:29:26 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=648d2f6a

ResolverDepthTestCase: test new-style virtuals

---
 pym/portage/tests/resolver/test_depth.py |   90 ++++++++++++++++++++++++++++++
 1 files changed, 90 insertions(+), 0 deletions(-)

diff --git a/pym/portage/tests/resolver/test_depth.py b/pym/portage/tests/resolver/test_depth.py
index dc67005..cecdd37 100644
--- a/pym/portage/tests/resolver/test_depth.py
+++ b/pym/portage/tests/resolver/test_depth.py
@@ -16,12 +16,39 @@ class ResolverDepthTestCase(TestCase):
 			"dev-libs/B-2": {"RDEPEND" : "dev-libs/C"},
 			"dev-libs/C-1": {},
 			"dev-libs/C-2": {},
+
+			"virtual/jre-1.5.0"        : {"SLOT" : "1.5", "RDEPEND" : "|| ( =dev-java/sun-jre-bin-1.5.0* =virtual/jdk-1.5.0* )"},
+			"virtual/jre-1.5.0-r1"     : {"SLOT" : "1.5", "RDEPEND" : "|| ( =dev-java/sun-jre-bin-1.5.0* =virtual/jdk-1.5.0* )"},
+			"virtual/jre-1.6.0"        : {"SLOT" : "1.6", "RDEPEND" : "|| ( =dev-java/sun-jre-bin-1.6.0* =virtual/jdk-1.6.0* )"},
+			"virtual/jre-1.6.0-r1"     : {"SLOT" : "1.6", "RDEPEND" : "|| ( =dev-java/sun-jre-bin-1.6.0* =virtual/jdk-1.6.0* )"},
+			"virtual/jdk-1.5.0"        : {"SLOT" : "1.5", "RDEPEND" : "|| ( =dev-java/sun-jdk-1.5.0* dev-java/gcj-jdk )"},
+			"virtual/jdk-1.5.0-r1"     : {"SLOT" : "1.5", "RDEPEND" : "|| ( =dev-java/sun-jdk-1.5.0* dev-java/gcj-jdk )"},
+			"virtual/jdk-1.6.0"        : {"SLOT" : "1.6", "RDEPEND" : "|| ( =dev-java/icedtea-6* =dev-java/sun-jdk-1.6.0* )"},
+			"virtual/jdk-1.6.0-r1"     : {"SLOT" : "1.6", "RDEPEND" : "|| ( =dev-java/icedtea-6* =dev-java/sun-jdk-1.6.0* )"},
+			"dev-java/gcj-jdk-4.5"     : {},
+			"dev-java/gcj-jdk-4.5-r1"  : {},
+			"dev-java/icedtea-6.1"     : {},
+			"dev-java/icedtea-6.1-r1"  : {},
+			"dev-java/sun-jdk-1.5"     : {"SLOT" : "1.5"},
+			"dev-java/sun-jdk-1.6"     : {"SLOT" : "1.6"},
+			"dev-java/sun-jre-bin-1.5" : {"SLOT" : "1.5"},
+			"dev-java/sun-jre-bin-1.6" : {"SLOT" : "1.6"},
+
+			"dev-java/ant-core-1.8"   : {"DEPEND"  : ">=virtual/jdk-1.4"},
+			"dev-db/hsqldb-1.8"       : {"RDEPEND" : ">=virtual/jre-1.6"},
 			}
 
 		installed = {
 			"dev-libs/A-1": {"RDEPEND" : "dev-libs/B"},
 			"dev-libs/B-1": {"RDEPEND" : "dev-libs/C"},
 			"dev-libs/C-1": {},
+
+			"virtual/jre-1.5.0"       : {"SLOT" : "1.5", "RDEPEND" : "|| ( =virtual/jdk-1.5.0* =dev-java/sun-jre-bin-1.5.0* )"},
+			"virtual/jre-1.6.0"       : {"SLOT" : "1.6", "RDEPEND" : "|| ( =virtual/jdk-1.6.0* =dev-java/sun-jre-bin-1.6.0* )"},
+			"virtual/jdk-1.5.0"       : {"SLOT" : "1.5", "RDEPEND" : "|| ( =dev-java/sun-jdk-1.5.0* dev-java/gcj-jdk )"},
+			"virtual/jdk-1.6.0"       : {"SLOT" : "1.6", "RDEPEND" : "|| ( =dev-java/icedtea-6* =dev-java/sun-jdk-1.6.0* )"},
+			"dev-java/gcj-jdk-4.5"    : {},
+			"dev-java/icedtea-6.1"    : {},
 			}
 
 		world = ["dev-libs/A"]
@@ -68,6 +95,69 @@ class ResolverDepthTestCase(TestCase):
 				options = {"--deep": 2},
 				success = True,
 				mergelist = ["dev-libs/A-2"]),
+
+			ResolverPlaygroundTestCase(
+				["virtual/jre"],
+				options = {},
+				success = True,
+				mergelist = ['virtual/jre-1.6.0-r1']),
+
+			ResolverPlaygroundTestCase(
+				["virtual/jre"],
+				options = {"--deep" : True},
+				success = True,
+				mergelist = ['virtual/jre-1.6.0-r1']),
+
+			# Test bug #141118, where we avoid pulling in
+			# redundant deps, satisfying nested virtuals
+			# as efficiently as possible.
+			ResolverPlaygroundTestCase(
+				["virtual/jre"],
+				options = {"--selective" : True, "--deep" : True},
+				success = True,
+				mergelist = []),
+
+			# Test bug #150361, where depgraph._greedy_slots()
+			# is triggered by --update with AtomArg.
+			ResolverPlaygroundTestCase(
+				["virtual/jre"],
+				options = {"--update" : True},
+				success = True,
+				mergelist = ['dev-java/icedtea-6.1-r1', 'dev-java/gcj-jdk-4.5-r1', 'virtual/jdk-1.6.0-r1', 'virtual/jdk-1.5.0-r1', 'virtual/jre-1.6.0-r1', 'virtual/jre-1.5.0-r1']),
+
+			ResolverPlaygroundTestCase(
+				["virtual/jre:1.5"],
+				options = {"--update" : True},
+				success = True,
+				mergelist = ['dev-java/gcj-jdk-4.5-r1', 'virtual/jdk-1.5.0-r1', 'virtual/jre-1.5.0-r1']),
+
+			ResolverPlaygroundTestCase(
+				["virtual/jre:1.6"],
+				options = {"--update" : True},
+				success = True,
+				mergelist = ['dev-java/icedtea-6.1-r1', 'virtual/jdk-1.6.0-r1', 'virtual/jre-1.6.0-r1']),
+
+			# Test that we don't pull in any unnecessary updates
+			# when --update is not specified, even though we
+			# specified --deep.
+			ResolverPlaygroundTestCase(
+				["dev-java/ant-core"],
+				options = {"--deep" : True},
+				success = True,
+				mergelist = ["dev-java/ant-core-1.8"]),
+
+			# FIXME: pulls in unwanted updates without --deep: ['dev-java/icedtea-6.1-r1', 'virtual/jdk-1.6.0-r1', 'dev-java/ant-core-1.8']
+			#ResolverPlaygroundTestCase(
+			#	["dev-java/ant-core"],
+			#	options = {"--update" : True},
+			#	success = True,
+			#	mergelist = ["dev-java/ant-core-1.8"]),
+
+			ResolverPlaygroundTestCase(
+				["dev-db/hsqldb"],
+				options = {"--deep" : True},
+				success = True,
+				mergelist = ["dev-db/hsqldb-1.8"]),
 			)
 
 		playground = ResolverPlayground(ebuilds=ebuilds, installed=installed,



^ permalink raw reply related	[flat|nested] 27+ messages in thread

* [gentoo-commits] proj/portage:2.1.9 commit in: pym/portage/tests/resolver/
@ 2011-02-14  4:31 Zac Medico
  0 siblings, 0 replies; 27+ messages in thread
From: Zac Medico @ 2011-02-14  4:31 UTC (permalink / raw
  To: gentoo-commits

commit:     1b3d6e5e54b7680cb7329babfbdc123bcdcf3472
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Sun Feb 13 11:34:32 2011 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Mon Feb 14 04:29:15 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=1b3d6e5e

ResolverDepthTestCase: add more cases

---
 pym/portage/tests/resolver/test_depth.py |   31 ++++++++++++++++++++++++++++-
 1 files changed, 29 insertions(+), 2 deletions(-)

diff --git a/pym/portage/tests/resolver/test_depth.py b/pym/portage/tests/resolver/test_depth.py
index 5a30941..dc67005 100644
--- a/pym/portage/tests/resolver/test_depth.py
+++ b/pym/portage/tests/resolver/test_depth.py
@@ -24,6 +24,8 @@ class ResolverDepthTestCase(TestCase):
 			"dev-libs/C-1": {},
 			}
 
+		world = ["dev-libs/A"]
+
 		test_cases = (
 			ResolverPlaygroundTestCase(
 				["dev-libs/A"],
@@ -39,12 +41,37 @@ class ResolverDepthTestCase(TestCase):
 
 			ResolverPlaygroundTestCase(
 				["dev-libs/A"],
-				options = {"--update": True, "--deep": 3},
+				options = {"--update": True, "--deep": 2},
+				success = True,
+				mergelist = ["dev-libs/C-2", "dev-libs/B-2", "dev-libs/A-2"]),
+
+			ResolverPlaygroundTestCase(
+				["@world"],
+				options = {"--update": True, "--deep": True},
+				success = True,
+				mergelist = ["dev-libs/C-2", "dev-libs/B-2", "dev-libs/A-2"]),
+
+			ResolverPlaygroundTestCase(
+				["@world"],
+				options = {"--emptytree": True},
 				success = True,
 				mergelist = ["dev-libs/C-2", "dev-libs/B-2", "dev-libs/A-2"]),
+
+			ResolverPlaygroundTestCase(
+				["@world"],
+				options = {"--selective": True, "--deep": True},
+				success = True,
+				mergelist = []),
+
+			ResolverPlaygroundTestCase(
+				["dev-libs/A"],
+				options = {"--deep": 2},
+				success = True,
+				mergelist = ["dev-libs/A-2"]),
 			)
 
-		playground = ResolverPlayground(ebuilds=ebuilds, installed=installed)
+		playground = ResolverPlayground(ebuilds=ebuilds, installed=installed,
+			world=world)
 		try:
 			for test_case in test_cases:
 				playground.run_TestCase(test_case)



^ permalink raw reply related	[flat|nested] 27+ messages in thread

* [gentoo-commits] proj/portage:2.1.9 commit in: pym/portage/tests/resolver/
@ 2011-02-14  4:31 Zac Medico
  0 siblings, 0 replies; 27+ messages in thread
From: Zac Medico @ 2011-02-14  4:31 UTC (permalink / raw
  To: gentoo-commits

commit:     15b84386d7f91da7c96cb9b3533ee023ae03439f
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Sun Feb 13 17:35:07 2011 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Mon Feb 14 04:30:21 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=15b84386

ResolverDepthTestCase: add more cases

---
 pym/portage/tests/resolver/test_depth.py |   46 ++++++++++++++++++++++++++++++
 1 files changed, 46 insertions(+), 0 deletions(-)

diff --git a/pym/portage/tests/resolver/test_depth.py b/pym/portage/tests/resolver/test_depth.py
index 65cfac6..f070167 100644
--- a/pym/portage/tests/resolver/test_depth.py
+++ b/pym/portage/tests/resolver/test_depth.py
@@ -17,6 +17,15 @@ class ResolverDepthTestCase(TestCase):
 			"dev-libs/C-1": {},
 			"dev-libs/C-2": {},
 
+			"virtual/libusb-0"         : {"EAPI" :"2", "SLOT" : "0", "RDEPEND" : "|| ( >=dev-libs/libusb-0.1.12-r1:0 dev-libs/libusb-compat >=sys-freebsd/freebsd-lib-8.0[usb] )"},
+			"virtual/libusb-1"         : {"EAPI" :"2", "SLOT" : "1", "RDEPEND" : ">=dev-libs/libusb-1.0.4:1"},
+			"dev-libs/libusb-0.1.13"   : {},
+			"dev-libs/libusb-1.0.5"    : {"SLOT":"1"},
+			"dev-libs/libusb-compat-1" : {},
+			"sys-freebsd/freebsd-lib-8": {"IUSE" : "+usb"},
+
+			"sys-fs/udev-164"          : {"EAPI" : "1", "RDEPEND" : "virtual/libusb:0"},
+
 			"virtual/jre-1.5.0"        : {"SLOT" : "1.5", "RDEPEND" : "|| ( =dev-java/sun-jre-bin-1.5.0* =virtual/jdk-1.5.0* )"},
 			"virtual/jre-1.5.0-r1"     : {"SLOT" : "1.5", "RDEPEND" : "|| ( =dev-java/sun-jre-bin-1.5.0* =virtual/jdk-1.5.0* )"},
 			"virtual/jre-1.6.0"        : {"SLOT" : "1.6", "RDEPEND" : "|| ( =dev-java/sun-jre-bin-1.6.0* =virtual/jdk-1.6.0* )"},
@@ -49,6 +58,8 @@ class ResolverDepthTestCase(TestCase):
 			"virtual/jdk-1.6.0"       : {"SLOT" : "1.6", "RDEPEND" : "|| ( =dev-java/icedtea-6* =dev-java/sun-jdk-1.6.0* )"},
 			"dev-java/gcj-jdk-4.5"    : {},
 			"dev-java/icedtea-6.1"    : {},
+
+			"virtual/libusb-0"         : {"EAPI" :"2", "SLOT" : "0", "RDEPEND" : "|| ( >=dev-libs/libusb-0.1.12-r1:0 dev-libs/libusb-compat >=sys-freebsd/freebsd-lib-8.0[usb] )"},
 			}
 
 		world = ["dev-libs/A"]
@@ -175,6 +186,41 @@ class ResolverDepthTestCase(TestCase):
 				options = {"--deep" : True},
 				success = True,
 				mergelist = ["dev-db/hsqldb-1.8"]),
+
+			# Pull in direct dep of virtual, even with --deep=0.
+			ResolverPlaygroundTestCase(
+				["sys-fs/udev"],
+				options = {"--deep" : 0},
+				success = True,
+				mergelist = ['dev-libs/libusb-0.1.13', 'sys-fs/udev-164']),
+
+			# Test --nodeps with direct virtual deps.
+			ResolverPlaygroundTestCase(
+				["sys-fs/udev"],
+				options = {"--nodeps" : True},
+				success = True,
+				mergelist = ["sys-fs/udev-164"]),
+
+			# Test that --nodeps overrides --deep.
+			ResolverPlaygroundTestCase(
+				["sys-fs/udev"],
+				options = {"--nodeps" : True, "--deep" : True},
+				success = True,
+				mergelist = ["sys-fs/udev-164"]),
+
+			# Test that --nodeps overrides --emptytree.
+			ResolverPlaygroundTestCase(
+				["sys-fs/udev"],
+				options = {"--nodeps" : True, "--emptytree" : True},
+				success = True,
+				mergelist = ["sys-fs/udev-164"]),
+
+			# Test --emptytree with virtuals.
+			ResolverPlaygroundTestCase(
+				["sys-fs/udev"],
+				options = {"--emptytree" : True},
+				success = True,
+				mergelist = ['dev-libs/libusb-0.1.13', 'virtual/libusb-0', 'sys-fs/udev-164']),
 			)
 
 		playground = ResolverPlayground(ebuilds=ebuilds, installed=installed,



^ permalink raw reply related	[flat|nested] 27+ messages in thread

* [gentoo-commits] proj/portage:2.1.9 commit in: pym/portage/tests/resolver/
@ 2011-02-20  0:04 Zac Medico
  0 siblings, 0 replies; 27+ messages in thread
From: Zac Medico @ 2011-02-20  0:04 UTC (permalink / raw
  To: gentoo-commits

commit:     a310423801c0042045978d20a8522736ff5f75ed
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Thu Feb 17 10:43:02 2011 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Sun Feb 20 00:01:23 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=a3104238

ResolverDepthTestCase: test --selective more

---
 pym/portage/tests/resolver/test_depth.py |   15 +++++++++++++++
 1 files changed, 15 insertions(+), 0 deletions(-)

diff --git a/pym/portage/tests/resolver/test_depth.py b/pym/portage/tests/resolver/test_depth.py
index f070167..ec3e238 100644
--- a/pym/portage/tests/resolver/test_depth.py
+++ b/pym/portage/tests/resolver/test_depth.py
@@ -187,6 +187,21 @@ class ResolverDepthTestCase(TestCase):
 				success = True,
 				mergelist = ["dev-db/hsqldb-1.8"]),
 
+			# Don't traverse deps of an installed package with --deep=0,
+			# even if it's a virtual.
+			ResolverPlaygroundTestCase(
+				["virtual/libusb:0"],
+				options = {"--selective" : True, "--deep" : 0},
+				success = True,
+				mergelist = []),
+
+			# Satisfy unsatisfied dep of installed package with --deep=1.
+			ResolverPlaygroundTestCase(
+				["virtual/libusb:0"],
+				options = {"--selective" : True, "--deep" : 1},
+				success = True,
+				mergelist = ['dev-libs/libusb-0.1.13']),
+
 			# Pull in direct dep of virtual, even with --deep=0.
 			ResolverPlaygroundTestCase(
 				["sys-fs/udev"],



^ permalink raw reply related	[flat|nested] 27+ messages in thread

* [gentoo-commits] proj/portage:2.1.9 commit in: pym/portage/tests/resolver/
@ 2011-05-26  6:18 Zac Medico
  0 siblings, 0 replies; 27+ messages in thread
From: Zac Medico @ 2011-05-26  6:18 UTC (permalink / raw
  To: gentoo-commits

commit:     05796ead3c2a1536929de9dba22d0c700baa19a3
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Sat May 21 00:51:09 2011 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Thu May 26 03:42:20 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=05796ead

ResolverPlayground: support ambigous_merge_order

---
 pym/portage/tests/resolver/ResolverPlayground.py |   49 ++++++++++++++++++++-
 pym/portage/tests/resolver/test_merge_order.py   |   45 ++++++++++++++++++++
 2 files changed, 91 insertions(+), 3 deletions(-)

diff --git a/pym/portage/tests/resolver/ResolverPlayground.py b/pym/portage/tests/resolver/ResolverPlayground.py
index 073e3a6..bc2f800 100644
--- a/pym/portage/tests/resolver/ResolverPlayground.py
+++ b/pym/portage/tests/resolver/ResolverPlayground.py
@@ -3,6 +3,7 @@
 
 from itertools import permutations
 import shutil
+import sys
 import tempfile
 import portage
 from portage import os
@@ -24,6 +25,9 @@ from _emerge.create_depgraph_params import create_depgraph_params
 from _emerge.depgraph import backtrack_depgraph
 from _emerge.RootConfig import RootConfig
 
+if sys.hexversion >= 0x3000000:
+	basestring = str
+
 class ResolverPlayground(object):
 	"""
 	This class helps to create the necessary files on disk and
@@ -463,6 +467,7 @@ class ResolverPlaygroundTestCase(object):
 	def __init__(self, request, **kwargs):
 		self.all_permutations = kwargs.pop("all_permutations", False)
 		self.ignore_mergelist_order = kwargs.pop("ignore_mergelist_order", False)
+		self.ambigous_merge_order = kwargs.pop("ambigous_merge_order", False)
 		self.check_repo_names = kwargs.pop("check_repo_names", False)
 
 		if self.all_permutations:
@@ -502,13 +507,51 @@ class ResolverPlaygroundTestCase(object):
 						got = new_got
 					if expected:
 						new_expected = []
-						for cpv in expected:
-							a = Atom("="+cpv, allow_repo=True)
-							new_expected.append(a.cpv)
+						for obj in expected:
+							if isinstance(obj, basestring):
+								a = Atom("="+obj, allow_repo=True)
+								new_expected.append(a.cpv)
+								continue
+							new_expected.append(set())
+							for cpv in obj:
+								a = Atom("="+cpv, allow_repo=True)
+								new_expected[-1].add(a.cpv)
 						expected = new_expected
 				if self.ignore_mergelist_order and got is not None:
 					got = set(got)
 					expected = set(expected)
+
+				if self.ambigous_merge_order and got:
+					expected_stack = list(reversed(expected))
+					got_stack = list(reversed(got))
+					new_expected = []
+					while got_stack and expected_stack:
+						got_token = got_stack.pop()
+						expected_obj = expected_stack.pop()
+						if isinstance(expected_obj, basestring):
+							new_expected.append(got_token)
+							continue
+						expected_obj = set(expected_obj)
+						try:
+							expected_obj.remove(got_token)
+						except KeyError:
+							# result doesn't match, so stop early
+							break
+						new_expected.append(got_token)
+						match = True
+						while got_stack and expected_obj:
+							got_token = got_stack.pop()
+							try:
+								expected_obj.remove(got_token)
+							except KeyError:
+								match = False
+								break
+							new_expected.append(got_token)
+						if not match:
+							# result doesn't match, so stop early
+							break
+					expected = new_expected
+
 			elif key == "unstable_keywords" and expected is not None:
 				expected = set(expected)
 

diff --git a/pym/portage/tests/resolver/test_merge_order.py b/pym/portage/tests/resolver/test_merge_order.py
new file mode 100644
index 0000000..ada9e73
--- /dev/null
+++ b/pym/portage/tests/resolver/test_merge_order.py
@@ -0,0 +1,45 @@
+# Copyright 2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+from portage.tests import TestCase
+from portage.tests.resolver.ResolverPlayground import (ResolverPlayground,
+	ResolverPlaygroundTestCase)
+
+class MergeOrderTestCase(TestCase):
+
+	def testMergeOrder(self):
+		ebuilds = {
+			"app-misc/circ-runtime-a-1": {
+				"RDEPEND": "app-misc/circ-runtime-b",
+			},
+			"app-misc/circ-runtime-b-1": {
+				"RDEPEND": "app-misc/circ-runtime-a",
+			},
+			"app-misc/some-app-a-1": {
+				"RDEPEND": "app-misc/circ-runtime-a app-misc/circ-runtime-b",
+			},
+		}
+
+		installed = {
+		}
+
+		test_cases = (
+			ResolverPlaygroundTestCase(
+				["app-misc/some-app-a"],
+				success = True,
+				ambigous_merge_order = True,
+				mergelist = [("app-misc/circ-runtime-a-1", "app-misc/circ-runtime-b-1"), "app-misc/some-app-a-1"]),
+			ResolverPlaygroundTestCase(
+				["app-misc/some-app-a"],
+				success = True,
+				ambigous_merge_order = True,
+				mergelist = [("app-misc/circ-runtime-b-1", "app-misc/circ-runtime-a-1"), "app-misc/some-app-a-1"]),
+		)
+
+		playground = ResolverPlayground(ebuilds=ebuilds, installed=installed)
+		try:
+			for test_case in test_cases:
+				playground.run_TestCase(test_case)
+				self.assertEqual(test_case.test_success, True, test_case.fail_msg)
+		finally:
+			playground.cleanup()



^ permalink raw reply related	[flat|nested] 27+ messages in thread

* [gentoo-commits] proj/portage:2.1.9 commit in: pym/portage/tests/resolver/
@ 2011-05-26  6:18 Zac Medico
  0 siblings, 0 replies; 27+ messages in thread
From: Zac Medico @ 2011-05-26  6:18 UTC (permalink / raw
  To: gentoo-commits

commit:     9db2b5509b4a0f315552fa11c9b8b7b389ea2a3d
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Sat May 21 01:00:02 2011 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Thu May 26 03:42:35 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=9db2b550

test_merge_order: test circular RDEPEND + PDEPEND

---
 pym/portage/tests/resolver/test_merge_order.py |   16 ++++++++++++++++
 1 files changed, 16 insertions(+), 0 deletions(-)

diff --git a/pym/portage/tests/resolver/test_merge_order.py b/pym/portage/tests/resolver/test_merge_order.py
index ada9e73..9c5d1fe 100644
--- a/pym/portage/tests/resolver/test_merge_order.py
+++ b/pym/portage/tests/resolver/test_merge_order.py
@@ -9,6 +9,12 @@ class MergeOrderTestCase(TestCase):
 
 	def testMergeOrder(self):
 		ebuilds = {
+			"app-misc/circ-post-runtime-a-1": {
+				"PDEPEND": "app-misc/circ-post-runtime-b",
+			},
+			"app-misc/circ-post-runtime-b-1": {
+				"RDEPEND": "app-misc/circ-post-runtime-a",
+			},
 			"app-misc/circ-runtime-a-1": {
 				"RDEPEND": "app-misc/circ-runtime-b",
 			},
@@ -18,6 +24,9 @@ class MergeOrderTestCase(TestCase):
 			"app-misc/some-app-a-1": {
 				"RDEPEND": "app-misc/circ-runtime-a app-misc/circ-runtime-b",
 			},
+			"app-misc/some-app-b-1": {
+				"RDEPEND": "app-misc/circ-post-runtime-a app-misc/circ-post-runtime-b",
+			},
 		}
 
 		installed = {
@@ -34,6 +43,13 @@ class MergeOrderTestCase(TestCase):
 				success = True,
 				ambigous_merge_order = True,
 				mergelist = [("app-misc/circ-runtime-b-1", "app-misc/circ-runtime-a-1"), "app-misc/some-app-a-1"]),
+			# Test optimal merge order for a circular dep that is
+			# RDEPEND in one direction and PDEPEND in the other.
+			ResolverPlaygroundTestCase(
+				["app-misc/some-app-a"],
+				success = True,
+				ambigous_merge_order = True,
+				mergelist = ["app-misc/circ-post-runtime-a-1", "app-misc/circ-post-runtime-b-1", "app-misc/some-app-b-1"]),
 		)
 
 		playground = ResolverPlayground(ebuilds=ebuilds, installed=installed)



^ permalink raw reply related	[flat|nested] 27+ messages in thread

* [gentoo-commits] proj/portage:2.1.9 commit in: pym/portage/tests/resolver/
@ 2011-05-26  6:18 Zac Medico
  0 siblings, 0 replies; 27+ messages in thread
From: Zac Medico @ 2011-05-26  6:18 UTC (permalink / raw
  To: gentoo-commits

commit:     93a393b112a2810c62903ced87cb0c267b94160c
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Sat May 21 03:30:30 2011 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Thu May 26 03:42:58 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=93a393b1

test_merge_order: test blocker resolution

---
 pym/portage/tests/resolver/ResolverPlayground.py |    6 +++++
 pym/portage/tests/resolver/test_merge_order.py   |   23 ++++++++++++++++++++++
 2 files changed, 29 insertions(+), 0 deletions(-)

diff --git a/pym/portage/tests/resolver/ResolverPlayground.py b/pym/portage/tests/resolver/ResolverPlayground.py
index 402db7b..667731b 100644
--- a/pym/portage/tests/resolver/ResolverPlayground.py
+++ b/pym/portage/tests/resolver/ResolverPlayground.py
@@ -502,6 +502,9 @@ class ResolverPlaygroundTestCase(object):
 					if got:
 						new_got = []
 						for cpv in got:
+							if cpv[:1] == "!":
+								new_got.append(cpv)
+								continue
 							a = Atom("="+cpv, allow_repo=True)
 							new_got.append(a.cpv)
 						got = new_got
@@ -509,6 +512,9 @@ class ResolverPlaygroundTestCase(object):
 						new_expected = []
 						for obj in expected:
 							if isinstance(obj, basestring):
+								if obj[:1] == "!":
+									new_expected.append(obj)
+									continue
 								a = Atom("="+obj, allow_repo=True)
 								new_expected.append(a.cpv)
 								continue

diff --git a/pym/portage/tests/resolver/test_merge_order.py b/pym/portage/tests/resolver/test_merge_order.py
index a59a678..6c929f7 100644
--- a/pym/portage/tests/resolver/test_merge_order.py
+++ b/pym/portage/tests/resolver/test_merge_order.py
@@ -9,6 +9,8 @@ class MergeOrderTestCase(TestCase):
 
 	def testMergeOrder(self):
 		ebuilds = {
+			"app-misc/blocker-buildtime-a-1" : {},
+			"app-misc/blocker-runtime-a-1" : {},
 			"app-misc/circ-post-runtime-a-1": {
 				"PDEPEND": "app-misc/circ-post-runtime-b",
 			},
@@ -21,6 +23,10 @@ class MergeOrderTestCase(TestCase):
 			"app-misc/circ-runtime-b-1": {
 				"RDEPEND": "app-misc/circ-runtime-a",
 			},
+			"app-misc/installed-blocker-a-1" : {
+				"DEPEND" : "!app-misc/blocker-buildtime-a",
+				"RDEPEND" : "!app-misc/blocker-runtime-a",
+			},
 			"app-misc/some-app-a-1": {
 				"RDEPEND": "app-misc/circ-runtime-a app-misc/circ-runtime-b",
 			},
@@ -30,6 +36,10 @@ class MergeOrderTestCase(TestCase):
 		}
 
 		installed = {
+			"app-misc/installed-blocker-a-1" : {
+				"DEPEND" : "!app-misc/blocker-buildtime-a",
+				"RDEPEND" : "!app-misc/blocker-runtime-a",
+			}
 		}
 
 		test_cases = (
@@ -49,6 +59,19 @@ class MergeOrderTestCase(TestCase):
 				["app-misc/some-app-b"],
 				success = True,
 				mergelist = ["app-misc/circ-post-runtime-a-1", "app-misc/circ-post-runtime-b-1", "app-misc/some-app-b-1"]),
+			# installed package has buildtime-only blocker
+			# that should be ignored
+			ResolverPlaygroundTestCase(
+				["app-misc/blocker-buildtime-a"],
+				success = True,
+				mergelist = ["app-misc/blocker-buildtime-a-1"]),
+			# installed package has runtime blocker that
+			# should cause it to be uninstalled
+			# TODO: distinguish between install/uninstall tasks in mergelist
+			ResolverPlaygroundTestCase(
+				["app-misc/blocker-runtime-a"],
+				success = True,
+				mergelist = ["app-misc/blocker-runtime-a-1", "app-misc/installed-blocker-a-1", "!app-misc/blocker-runtime-a"]),
 		)
 
 		playground = ResolverPlayground(ebuilds=ebuilds, installed=installed)



^ permalink raw reply related	[flat|nested] 27+ messages in thread

* [gentoo-commits] proj/portage:2.1.9 commit in: pym/portage/tests/resolver/
@ 2011-05-26  6:18 Zac Medico
  0 siblings, 0 replies; 27+ messages in thread
From: Zac Medico @ 2011-05-26  6:18 UTC (permalink / raw
  To: gentoo-commits

commit:     9b1025750023ff2e0193a6934d92ce382e523ff7
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Sat May 21 01:16:46 2011 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Thu May 26 03:42:52 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=9b102575

test_merge_order: remove uneeded ambigous flag

---
 pym/portage/tests/resolver/test_merge_order.py |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/pym/portage/tests/resolver/test_merge_order.py b/pym/portage/tests/resolver/test_merge_order.py
index f51d14f..a59a678 100644
--- a/pym/portage/tests/resolver/test_merge_order.py
+++ b/pym/portage/tests/resolver/test_merge_order.py
@@ -48,7 +48,6 @@ class MergeOrderTestCase(TestCase):
 			ResolverPlaygroundTestCase(
 				["app-misc/some-app-b"],
 				success = True,
-				ambigous_merge_order = True,
 				mergelist = ["app-misc/circ-post-runtime-a-1", "app-misc/circ-post-runtime-b-1", "app-misc/some-app-b-1"]),
 		)
 



^ permalink raw reply related	[flat|nested] 27+ messages in thread

* [gentoo-commits] proj/portage:2.1.9 commit in: pym/portage/tests/resolver/
@ 2011-05-26  6:18 Zac Medico
  0 siblings, 0 replies; 27+ messages in thread
From: Zac Medico @ 2011-05-26  6:18 UTC (permalink / raw
  To: gentoo-commits

commit:     809d6c8368a0209763eb441145670b27cdffd9aa
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Sat May 21 01:11:56 2011 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Thu May 26 03:42:45 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=809d6c83

test_merge_order: fix ambigous_merge_order bug

---
 pym/portage/tests/resolver/ResolverPlayground.py |    7 +++++--
 pym/portage/tests/resolver/test_merge_order.py   |    2 +-
 2 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/pym/portage/tests/resolver/ResolverPlayground.py b/pym/portage/tests/resolver/ResolverPlayground.py
index bc2f800..402db7b 100644
--- a/pym/portage/tests/resolver/ResolverPlayground.py
+++ b/pym/portage/tests/resolver/ResolverPlayground.py
@@ -529,8 +529,11 @@ class ResolverPlaygroundTestCase(object):
 						got_token = got_stack.pop()
 						expected_obj = expected_stack.pop()
 						if isinstance(expected_obj, basestring):
-							new_expected.append(got_token)
-							continue
+							new_expected.append(expected_obj)
+							if got_token == expected_obj:
+								continue
+							# result doesn't match, so stop early
+							break
 						expected_obj = set(expected_obj)
 						try:
 							expected_obj.remove(got_token)

diff --git a/pym/portage/tests/resolver/test_merge_order.py b/pym/portage/tests/resolver/test_merge_order.py
index 9c5d1fe..f51d14f 100644
--- a/pym/portage/tests/resolver/test_merge_order.py
+++ b/pym/portage/tests/resolver/test_merge_order.py
@@ -46,7 +46,7 @@ class MergeOrderTestCase(TestCase):
 			# Test optimal merge order for a circular dep that is
 			# RDEPEND in one direction and PDEPEND in the other.
 			ResolverPlaygroundTestCase(
-				["app-misc/some-app-a"],
+				["app-misc/some-app-b"],
 				success = True,
 				ambigous_merge_order = True,
 				mergelist = ["app-misc/circ-post-runtime-a-1", "app-misc/circ-post-runtime-b-1", "app-misc/some-app-b-1"]),



^ permalink raw reply related	[flat|nested] 27+ messages in thread

* [gentoo-commits] proj/portage:2.1.9 commit in: pym/portage/tests/resolver/
@ 2011-05-26  6:18 Zac Medico
  0 siblings, 0 replies; 27+ messages in thread
From: Zac Medico @ 2011-05-26  6:18 UTC (permalink / raw
  To: gentoo-commits

commit:     e9adefc7bdeff9287b62184cf68e9eeb156ef0a8
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Sat May 21 04:14:49 2011 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Thu May 26 03:43:25 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=e9adefc7

ambigous_merge_order: handle more failure modes

---
 pym/portage/tests/resolver/ResolverPlayground.py |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/pym/portage/tests/resolver/ResolverPlayground.py b/pym/portage/tests/resolver/ResolverPlayground.py
index 667731b..5048b44 100644
--- a/pym/portage/tests/resolver/ResolverPlayground.py
+++ b/pym/portage/tests/resolver/ResolverPlayground.py
@@ -559,6 +559,14 @@ class ResolverPlaygroundTestCase(object):
 						if not match:
 							# result doesn't match, so stop early
 							break
+						if expected_obj:
+							# result does not match, so stop early
+							new_expected.append(tuple(expected_obj))
+							break
+					if expected_stack:
+						# result does not match, add leftovers to new_expected
+						expected_stack.reverse()
+						new_expected.extend(expected_stack)
 					expected = new_expected
 
 			elif key == "unstable_keywords" and expected is not None:



^ permalink raw reply related	[flat|nested] 27+ messages in thread

* [gentoo-commits] proj/portage:2.1.9 commit in: pym/portage/tests/resolver/
@ 2011-05-26  6:18 Zac Medico
  0 siblings, 0 replies; 27+ messages in thread
From: Zac Medico @ 2011-05-26  6:18 UTC (permalink / raw
  To: gentoo-commits

commit:     98578f0b787bf164ff0af3e4d81ffd71565ff0ed
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Sat May 21 08:47:13 2011 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Thu May 26 03:43:47 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=98578f0b

test_merge_order: make cycles indirect

---
 pym/portage/tests/resolver/test_merge_order.py |   13 ++++++++++---
 1 files changed, 10 insertions(+), 3 deletions(-)

diff --git a/pym/portage/tests/resolver/test_merge_order.py b/pym/portage/tests/resolver/test_merge_order.py
index 45890af..5ec569a 100644
--- a/pym/portage/tests/resolver/test_merge_order.py
+++ b/pym/portage/tests/resolver/test_merge_order.py
@@ -23,12 +23,18 @@ class MergeOrderTestCase(TestCase):
 				"PDEPEND": "app-misc/circ-post-runtime-b",
 			},
 			"app-misc/circ-post-runtime-b-1": {
+				"RDEPEND": "app-misc/circ-post-runtime-c",
+			},
+			"app-misc/circ-post-runtime-c-1": {
 				"RDEPEND": "app-misc/circ-post-runtime-a",
 			},
 			"app-misc/circ-runtime-a-1": {
 				"RDEPEND": "app-misc/circ-runtime-b",
 			},
 			"app-misc/circ-runtime-b-1": {
+				"RDEPEND": "app-misc/circ-runtime-c",
+			},
+			"app-misc/circ-runtime-c-1": {
 				"RDEPEND": "app-misc/circ-runtime-a",
 			},
 			"app-misc/installed-blocker-a-1" : {
@@ -57,18 +63,19 @@ class MergeOrderTestCase(TestCase):
 				["app-misc/some-app-a"],
 				success = True,
 				ambigous_merge_order = True,
-				mergelist = [("app-misc/circ-runtime-a-1", "app-misc/circ-runtime-b-1"), "app-misc/some-app-a-1"]),
+				mergelist = [("app-misc/circ-runtime-a-1", "app-misc/circ-runtime-b-1", "app-misc/circ-runtime-c-1"), "app-misc/some-app-a-1"]),
 			ResolverPlaygroundTestCase(
 				["app-misc/some-app-a"],
 				success = True,
 				ambigous_merge_order = True,
-				mergelist = [("app-misc/circ-runtime-b-1", "app-misc/circ-runtime-a-1"), "app-misc/some-app-a-1"]),
+				mergelist = [("app-misc/circ-runtime-c-1", "app-misc/circ-runtime-b-1", "app-misc/circ-runtime-a-1"), "app-misc/some-app-a-1"]),
 			# Test optimal merge order for a circular dep that is
 			# RDEPEND in one direction and PDEPEND in the other.
 			ResolverPlaygroundTestCase(
 				["app-misc/some-app-b"],
 				success = True,
-				mergelist = ["app-misc/circ-post-runtime-a-1", "app-misc/circ-post-runtime-b-1", "app-misc/some-app-b-1"]),
+				ambigous_merge_order = True,
+				mergelist = ["app-misc/circ-post-runtime-a-1", ("app-misc/circ-post-runtime-b-1", "app-misc/circ-post-runtime-c-1"), "app-misc/some-app-b-1"]),
 			# installed package has buildtime-only blocker
 			# that should be ignored
 			ResolverPlaygroundTestCase(



^ permalink raw reply related	[flat|nested] 27+ messages in thread

* [gentoo-commits] proj/portage:2.1.9 commit in: pym/portage/tests/resolver/
@ 2011-05-26  6:18 Zac Medico
  0 siblings, 0 replies; 27+ messages in thread
From: Zac Medico @ 2011-05-26  6:18 UTC (permalink / raw
  To: gentoo-commits

commit:     b66447b13f010a31272cadf887c94a94e79203d7
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Sat May 21 09:10:57 2011 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Thu May 26 03:43:56 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=b66447b1

test_merge_order: test circular RDEPEND + DEPEND

---
 pym/portage/tests/resolver/test_merge_order.py |   23 +++++++++++++++++++++++
 1 files changed, 23 insertions(+), 0 deletions(-)

diff --git a/pym/portage/tests/resolver/test_merge_order.py b/pym/portage/tests/resolver/test_merge_order.py
index 5ec569a..df0c3f1 100644
--- a/pym/portage/tests/resolver/test_merge_order.py
+++ b/pym/portage/tests/resolver/test_merge_order.py
@@ -19,6 +19,16 @@ class MergeOrderTestCase(TestCase):
 			},
 			"app-misc/blocker-runtime-a-1" : {},
 			"app-misc/blocker-runtime-hard-a-1" : {},
+			"app-misc/circ-buildtime-a-0": {},
+			"app-misc/circ-buildtime-a-1": {
+				"RDEPEND": "app-misc/circ-buildtime-b",
+			},
+			"app-misc/circ-buildtime-b-1": {
+				"RDEPEND": "app-misc/circ-buildtime-c",
+			},
+			"app-misc/circ-buildtime-c-1": {
+				"DEPEND": "app-misc/circ-buildtime-a",
+			},
 			"app-misc/circ-post-runtime-a-1": {
 				"PDEPEND": "app-misc/circ-post-runtime-b",
 			},
@@ -48,9 +58,13 @@ class MergeOrderTestCase(TestCase):
 			"app-misc/some-app-b-1": {
 				"RDEPEND": "app-misc/circ-post-runtime-a app-misc/circ-post-runtime-b",
 			},
+			"app-misc/some-app-c-1": {
+				"RDEPEND": "app-misc/circ-buildtime-a app-misc/circ-buildtime-b",
+			},
 		}
 
 		installed = {
+			"app-misc/circ-buildtime-a-0": {},
 			"app-misc/installed-blocker-a-1" : {
 				"EAPI"   : "2",
 				"DEPEND" : "!app-misc/blocker-buildtime-a",
@@ -70,6 +84,15 @@ class MergeOrderTestCase(TestCase):
 				ambigous_merge_order = True,
 				mergelist = [("app-misc/circ-runtime-c-1", "app-misc/circ-runtime-b-1", "app-misc/circ-runtime-a-1"), "app-misc/some-app-a-1"]),
 			# Test optimal merge order for a circular dep that is
+			# RDEPEND in one direction and DEPEND in the other.
+			# This requires an installed instance of the DEPEND
+			# package in order to be solvable.
+			ResolverPlaygroundTestCase(
+				["app-misc/some-app-c", "app-misc/circ-buildtime-a"],
+				success = True,
+				ambigous_merge_order = True,
+				mergelist = [("app-misc/circ-buildtime-b-1", "app-misc/circ-buildtime-c-1"), "app-misc/circ-buildtime-a-1", "app-misc/some-app-c-1"]),
+			# Test optimal merge order for a circular dep that is
 			# RDEPEND in one direction and PDEPEND in the other.
 			ResolverPlaygroundTestCase(
 				["app-misc/some-app-b"],



^ permalink raw reply related	[flat|nested] 27+ messages in thread

* [gentoo-commits] proj/portage:2.1.9 commit in: pym/portage/tests/resolver/
@ 2011-05-26  6:18 Zac Medico
  0 siblings, 0 replies; 27+ messages in thread
From: Zac Medico @ 2011-05-26  6:18 UTC (permalink / raw
  To: gentoo-commits

commit:     41687ee53dc493df50482095cf30b3c13f166aaf
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Sat May 21 04:01:31 2011 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Thu May 26 03:43:15 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=41687ee5

test_merge_order: test hard buildtime blockers

---
 pym/portage/tests/resolver/test_merge_order.py |   21 +++++++++++++++++++++
 1 files changed, 21 insertions(+), 0 deletions(-)

diff --git a/pym/portage/tests/resolver/test_merge_order.py b/pym/portage/tests/resolver/test_merge_order.py
index e7f1aa4..45890af 100644
--- a/pym/portage/tests/resolver/test_merge_order.py
+++ b/pym/portage/tests/resolver/test_merge_order.py
@@ -10,6 +10,13 @@ class MergeOrderTestCase(TestCase):
 	def testMergeOrder(self):
 		ebuilds = {
 			"app-misc/blocker-buildtime-a-1" : {},
+			"app-misc/blocker-buildtime-unbuilt-a-1" : {
+				"DEPEND" : "!app-misc/installed-blocker-a",
+			},
+			"app-misc/blocker-buildtime-unbuilt-hard-a-1" : {
+				"EAPI"   : "2",
+				"DEPEND" : "!!app-misc/installed-blocker-a",
+			},
 			"app-misc/blocker-runtime-a-1" : {},
 			"app-misc/blocker-runtime-hard-a-1" : {},
 			"app-misc/circ-post-runtime-a-1": {
@@ -75,6 +82,20 @@ class MergeOrderTestCase(TestCase):
 				["app-misc/blocker-runtime-a"],
 				success = True,
 				mergelist = ["app-misc/blocker-runtime-a-1", "app-misc/installed-blocker-a-1", "!app-misc/blocker-runtime-a"]),
+			# We have a soft buildtime blocker against an installed
+			# package that should cause it to be uninstalled.
+			# TODO: distinguish between install/uninstall tasks in mergelist
+			ResolverPlaygroundTestCase(
+				["app-misc/blocker-buildtime-unbuilt-a"],
+				success = True,
+				mergelist = ["app-misc/blocker-buildtime-unbuilt-a-1", "app-misc/installed-blocker-a-1", "!app-misc/installed-blocker-a"]),
+			# We have a hard buildtime blocker against an installed
+			# package that will not resolve automatically (unless
+			# the option requested in bug 250286 is implemented).
+			ResolverPlaygroundTestCase(
+				["app-misc/blocker-buildtime-unbuilt-hard-a"],
+				success = False,
+				mergelist = ['app-misc/blocker-buildtime-unbuilt-hard-a-1', '!!app-misc/installed-blocker-a']),
 			# An installed package has a hard runtime blocker that
 			# will not resolve automatically (unless the option
 			# requested in bug 250286 is implemented).



^ permalink raw reply related	[flat|nested] 27+ messages in thread

* [gentoo-commits] proj/portage:2.1.9 commit in: pym/portage/tests/resolver/
@ 2011-05-26  6:18 Zac Medico
  0 siblings, 0 replies; 27+ messages in thread
From: Zac Medico @ 2011-05-26  6:18 UTC (permalink / raw
  To: gentoo-commits

commit:     6bcc4a21a5fc0405690ca9e43bddf748913727c0
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Sat May 21 10:34:30 2011 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Thu May 26 03:47:11 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=6bcc4a21

merge_order_assertions: fix string format error

---
 pym/portage/tests/resolver/ResolverPlayground.py |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/pym/portage/tests/resolver/ResolverPlayground.py b/pym/portage/tests/resolver/ResolverPlayground.py
index fbd4c19..12037f7 100644
--- a/pym/portage/tests/resolver/ResolverPlayground.py
+++ b/pym/portage/tests/resolver/ResolverPlayground.py
@@ -578,7 +578,8 @@ class ResolverPlaygroundTestCase(object):
 								fail_msgs.append("atoms: (" + \
 									", ".join(result.atoms) + "), key: " + \
 									("merge_order_assertions, expected: %s" % \
-									(node1, node2)) + ", got: " + str(got))
+									str((node1, node2))) + \
+									", got: " + str(got))
 
 			elif key == "unstable_keywords" and expected is not None:
 				expected = set(expected)



^ permalink raw reply related	[flat|nested] 27+ messages in thread

* [gentoo-commits] proj/portage:2.1.9 commit in: pym/portage/tests/resolver/
@ 2011-05-26  6:18 Zac Medico
  0 siblings, 0 replies; 27+ messages in thread
From: Zac Medico @ 2011-05-26  6:18 UTC (permalink / raw
  To: gentoo-commits

commit:     9a5283c0d51ee5123d827ea0089aa052bd0c3174
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Sat May 21 09:20:55 2011 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Thu May 26 03:44:03 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=9a5283c0

test_merge_order: test unsolvable buildtime cycle

---
 pym/portage/tests/resolver/test_merge_order.py |   15 +++++++++++++++
 1 files changed, 15 insertions(+), 0 deletions(-)

diff --git a/pym/portage/tests/resolver/test_merge_order.py b/pym/portage/tests/resolver/test_merge_order.py
index df0c3f1..be41f82 100644
--- a/pym/portage/tests/resolver/test_merge_order.py
+++ b/pym/portage/tests/resolver/test_merge_order.py
@@ -29,6 +29,15 @@ class MergeOrderTestCase(TestCase):
 			"app-misc/circ-buildtime-c-1": {
 				"DEPEND": "app-misc/circ-buildtime-a",
 			},
+			"app-misc/circ-buildtime-unsolvable-a-1": {
+				"RDEPEND": "app-misc/circ-buildtime-unsolvable-b",
+			},
+			"app-misc/circ-buildtime-unsolvable-b-1": {
+				"RDEPEND": "app-misc/circ-buildtime-unsolvable-c",
+			},
+			"app-misc/circ-buildtime-unsolvable-c-1": {
+				"DEPEND": "app-misc/circ-buildtime-unsolvable-a",
+			},
 			"app-misc/circ-post-runtime-a-1": {
 				"PDEPEND": "app-misc/circ-post-runtime-b",
 			},
@@ -83,6 +92,12 @@ class MergeOrderTestCase(TestCase):
 				success = True,
 				ambigous_merge_order = True,
 				mergelist = [("app-misc/circ-runtime-c-1", "app-misc/circ-runtime-b-1", "app-misc/circ-runtime-a-1"), "app-misc/some-app-a-1"]),
+			# Test unsolvable circular dep that is RDEPEND in one
+			# direction and DEPEND in the other.
+			ResolverPlaygroundTestCase(
+				["app-misc/circ-buildtime-unsolvable-a"],
+				success = False,
+				circular_dependency_solutions = {}),
 			# Test optimal merge order for a circular dep that is
 			# RDEPEND in one direction and DEPEND in the other.
 			# This requires an installed instance of the DEPEND



^ permalink raw reply related	[flat|nested] 27+ messages in thread

* [gentoo-commits] proj/portage:2.1.9 commit in: pym/portage/tests/resolver/
@ 2011-05-26  6:18 Zac Medico
  0 siblings, 0 replies; 27+ messages in thread
From: Zac Medico @ 2011-05-26  6:18 UTC (permalink / raw
  To: gentoo-commits

commit:     8b0d03b18debcb9ddd80e083bf9216954fe22d97
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Sat May 21 10:30:05 2011 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Thu May 26 03:46:57 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=8b0d03b1

test_merge_order: test satisfied circular DEPEND

---
 pym/portage/tests/resolver/ResolverPlayground.py |   13 ++++++-
 pym/portage/tests/resolver/test_merge_order.py   |   43 ++++++++++++++++++++++
 2 files changed, 55 insertions(+), 1 deletions(-)

diff --git a/pym/portage/tests/resolver/ResolverPlayground.py b/pym/portage/tests/resolver/ResolverPlayground.py
index 5048b44..fbd4c19 100644
--- a/pym/portage/tests/resolver/ResolverPlayground.py
+++ b/pym/portage/tests/resolver/ResolverPlayground.py
@@ -469,6 +469,7 @@ class ResolverPlaygroundTestCase(object):
 		self.ignore_mergelist_order = kwargs.pop("ignore_mergelist_order", False)
 		self.ambigous_merge_order = kwargs.pop("ambigous_merge_order", False)
 		self.check_repo_names = kwargs.pop("check_repo_names", False)
+		self.merge_order_assertions = kwargs.pop("merge_order_assertions", False)
 
 		if self.all_permutations:
 			self.requests = list(permutations(request))
@@ -531,6 +532,7 @@ class ResolverPlaygroundTestCase(object):
 					expected_stack = list(reversed(expected))
 					got_stack = list(reversed(got))
 					new_expected = []
+					match = True
 					while got_stack and expected_stack:
 						got_token = got_stack.pop()
 						expected_obj = expected_stack.pop()
@@ -547,7 +549,6 @@ class ResolverPlaygroundTestCase(object):
 							# result doesn't match, so stop early
 							break
 						new_expected.append(got_token)
-						match = True
 						while got_stack and expected_obj:
 							got_token = got_stack.pop()
 							try:
@@ -561,14 +562,24 @@ class ResolverPlaygroundTestCase(object):
 							break
 						if expected_obj:
 							# result does not match, so stop early
+							match = False
 							new_expected.append(tuple(expected_obj))
 							break
 					if expected_stack:
 						# result does not match, add leftovers to new_expected
+						match = False
 						expected_stack.reverse()
 						new_expected.extend(expected_stack)
 					expected = new_expected
 
+					if match and self.merge_order_assertions:
+						for node1, node2 in self.merge_order_assertions:
+							if not (got.index(node1) < got.index(node2)):
+								fail_msgs.append("atoms: (" + \
+									", ".join(result.atoms) + "), key: " + \
+									("merge_order_assertions, expected: %s" % \
+									(node1, node2)) + ", got: " + str(got))
+
 			elif key == "unstable_keywords" and expected is not None:
 				expected = set(expected)
 

diff --git a/pym/portage/tests/resolver/test_merge_order.py b/pym/portage/tests/resolver/test_merge_order.py
index be41f82..62d16d9 100644
--- a/pym/portage/tests/resolver/test_merge_order.py
+++ b/pym/portage/tests/resolver/test_merge_order.py
@@ -56,6 +56,26 @@ class MergeOrderTestCase(TestCase):
 			"app-misc/circ-runtime-c-1": {
 				"RDEPEND": "app-misc/circ-runtime-a",
 			},
+			"app-misc/circ-satisfied-a-0": {
+				"RDEPEND": "app-misc/circ-satisfied-b",
+			},
+			"app-misc/circ-satisfied-a-1": {
+				"RDEPEND": "app-misc/circ-satisfied-b",
+			},
+			"app-misc/circ-satisfied-b-0": {
+				"RDEPEND": "app-misc/circ-satisfied-c",
+			},
+			"app-misc/circ-satisfied-b-1": {
+				"RDEPEND": "app-misc/circ-satisfied-c",
+			},
+			"app-misc/circ-satisfied-c-0": {
+				"DEPEND": "app-misc/circ-satisfied-a",
+				"RDEPEND": "app-misc/circ-satisfied-a",
+			},
+			"app-misc/circ-satisfied-c-1": {
+				"DEPEND": "app-misc/circ-satisfied-a",
+				"RDEPEND": "app-misc/circ-satisfied-a",
+			},
 			"app-misc/installed-blocker-a-1" : {
 				"EAPI"   : "2",
 				"DEPEND" : "!app-misc/blocker-buildtime-a",
@@ -74,6 +94,16 @@ class MergeOrderTestCase(TestCase):
 
 		installed = {
 			"app-misc/circ-buildtime-a-0": {},
+			"app-misc/circ-satisfied-a-0": {
+				"RDEPEND": "app-misc/circ-satisfied-b",
+			},
+			"app-misc/circ-satisfied-b-0": {
+				"RDEPEND": "app-misc/circ-satisfied-c",
+			},
+			"app-misc/circ-satisfied-c-0": {
+				"DEPEND": "app-misc/circ-satisfied-a",
+				"RDEPEND": "app-misc/circ-satisfied-a",
+			},
 			"app-misc/installed-blocker-a-1" : {
 				"EAPI"   : "2",
 				"DEPEND" : "!app-misc/blocker-buildtime-a",
@@ -114,6 +144,19 @@ class MergeOrderTestCase(TestCase):
 				success = True,
 				ambigous_merge_order = True,
 				mergelist = ["app-misc/circ-post-runtime-a-1", ("app-misc/circ-post-runtime-b-1", "app-misc/circ-post-runtime-c-1"), "app-misc/some-app-b-1"]),
+			# Test optimal merge order for a circular dep that is
+			# RDEPEND in one direction and DEPEND in the other,
+			# with all dependencies initially satisfied. Optimally,
+			# the DEPEND/buildtime dep should be updated before the
+			# package that depends on it, even though it's feasible
+			# to update it later since it is already satisfied.
+			ResolverPlaygroundTestCase(
+				["app-misc/circ-satisfied-a", "app-misc/circ-satisfied-b", "app-misc/circ-satisfied-c"],
+				success = True,
+				all_permutations = True,
+				ambigous_merge_order = True,
+				merge_order_assertions = (("app-misc/circ-satisfied-a-1", "app-misc/circ-satisfied-c-1"),),
+				mergelist = [("app-misc/circ-satisfied-a-1", "app-misc/circ-satisfied-b-1", "app-misc/circ-satisfied-c-1")]),
 			# installed package has buildtime-only blocker
 			# that should be ignored
 			ResolverPlaygroundTestCase(



^ permalink raw reply related	[flat|nested] 27+ messages in thread

* [gentoo-commits] proj/portage:2.1.9 commit in: pym/portage/tests/resolver/
@ 2011-05-26  6:18 Zac Medico
  0 siblings, 0 replies; 27+ messages in thread
From: Zac Medico @ 2011-05-26  6:18 UTC (permalink / raw
  To: gentoo-commits

commit:     481d9b87e89e8719042bd840c662b0fe3c26fc87
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Sat May 21 22:15:42 2011 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Thu May 26 03:47:55 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=481d9b87

test_merge_order: test solve blocker no-overlap

---
 pym/portage/tests/resolver/test_merge_order.py |   24 +++++++++++++++++++++++-
 1 files changed, 23 insertions(+), 1 deletions(-)

diff --git a/pym/portage/tests/resolver/test_merge_order.py b/pym/portage/tests/resolver/test_merge_order.py
index 62d16d9..bae9bca 100644
--- a/pym/portage/tests/resolver/test_merge_order.py
+++ b/pym/portage/tests/resolver/test_merge_order.py
@@ -17,6 +17,9 @@ class MergeOrderTestCase(TestCase):
 				"EAPI"   : "2",
 				"DEPEND" : "!!app-misc/installed-blocker-a",
 			},
+			"app-misc/blocker-update-order-a-1" : {
+				"RDEPEND" : ">=app-misc/installed-old-version-blocks-a-2"
+			},
 			"app-misc/blocker-runtime-a-1" : {},
 			"app-misc/blocker-runtime-hard-a-1" : {},
 			"app-misc/circ-buildtime-a-0": {},
@@ -81,6 +84,10 @@ class MergeOrderTestCase(TestCase):
 				"DEPEND" : "!app-misc/blocker-buildtime-a",
 				"RDEPEND" : "!app-misc/blocker-runtime-a !!app-misc/blocker-runtime-hard-a",
 			},
+			"app-misc/installed-old-version-blocks-a-1" : {
+				"RDEPEND" : "!app-misc/installed-old-version-blocks-a",
+			},
+			"app-misc/installed-old-version-blocks-a-2" : {},
 			"app-misc/some-app-a-1": {
 				"RDEPEND": "app-misc/circ-runtime-a app-misc/circ-runtime-b",
 			},
@@ -109,6 +116,9 @@ class MergeOrderTestCase(TestCase):
 				"DEPEND" : "!app-misc/blocker-buildtime-a",
 				"RDEPEND" : "!app-misc/blocker-runtime-a !!app-misc/blocker-runtime-hard-a",
 			},
+			"app-misc/installed-old-version-blocks-a-1" : {
+				"RDEPEND" : "!app-misc/installed-old-version-blocks-a",
+			},
 		}
 
 		test_cases = (
@@ -163,6 +173,15 @@ class MergeOrderTestCase(TestCase):
 				["app-misc/blocker-buildtime-a"],
 				success = True,
 				mergelist = ["app-misc/blocker-buildtime-a-1"]),
+			# We're installing a package that an old version of
+			# an installed package blocks. However, an update is
+			# available to the old package. The old package should
+			# be updated first, in order to solve the blocker without
+			# any need for blocking packages to temporarily overlap.
+			ResolverPlaygroundTestCase(
+				["app-misc/blocker-update-order-a"],
+				success = True,
+				mergelist = ["app-misc/installed-old-version-blocks-a-2", "app-misc/blocker-update-order-a-1"]),
 			# installed package has runtime blocker that
 			# should cause it to be uninstalled
 			# TODO: distinguish between install/uninstall tasks in mergelist
@@ -171,7 +190,10 @@ class MergeOrderTestCase(TestCase):
 				success = True,
 				mergelist = ["app-misc/blocker-runtime-a-1", "app-misc/installed-blocker-a-1", "!app-misc/blocker-runtime-a"]),
 			# We have a soft buildtime blocker against an installed
-			# package that should cause it to be uninstalled.
+			# package that should cause it to be uninstalled. Note that with
+			# soft blockers, the blocking packages are allowed to temporarily
+			# overlap. This allows any essential programs/libraries provided
+			# by both packages to be available at all times.
 			# TODO: distinguish between install/uninstall tasks in mergelist
 			ResolverPlaygroundTestCase(
 				["app-misc/blocker-buildtime-unbuilt-a"],



^ permalink raw reply related	[flat|nested] 27+ messages in thread

* [gentoo-commits] proj/portage:2.1.9 commit in: pym/portage/tests/resolver/
@ 2011-05-26  6:18 Zac Medico
  0 siblings, 0 replies; 27+ messages in thread
From: Zac Medico @ 2011-05-26  6:18 UTC (permalink / raw
  To: gentoo-commits

commit:     eaace2f20c6a9b1f1244997dcf5f4ac85623a4a4
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Sat May 21 22:36:41 2011 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Thu May 26 03:48:04 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=eaace2f2

test_merge_order: fix bugs in previous commit

---
 pym/portage/tests/resolver/test_merge_order.py |   11 +++++------
 1 files changed, 5 insertions(+), 6 deletions(-)

diff --git a/pym/portage/tests/resolver/test_merge_order.py b/pym/portage/tests/resolver/test_merge_order.py
index bae9bca..548f203 100644
--- a/pym/portage/tests/resolver/test_merge_order.py
+++ b/pym/portage/tests/resolver/test_merge_order.py
@@ -17,9 +17,7 @@ class MergeOrderTestCase(TestCase):
 				"EAPI"   : "2",
 				"DEPEND" : "!!app-misc/installed-blocker-a",
 			},
-			"app-misc/blocker-update-order-a-1" : {
-				"RDEPEND" : ">=app-misc/installed-old-version-blocks-a-2"
-			},
+			"app-misc/blocker-update-order-a-1" : {},
 			"app-misc/blocker-runtime-a-1" : {},
 			"app-misc/blocker-runtime-hard-a-1" : {},
 			"app-misc/circ-buildtime-a-0": {},
@@ -85,7 +83,7 @@ class MergeOrderTestCase(TestCase):
 				"RDEPEND" : "!app-misc/blocker-runtime-a !!app-misc/blocker-runtime-hard-a",
 			},
 			"app-misc/installed-old-version-blocks-a-1" : {
-				"RDEPEND" : "!app-misc/installed-old-version-blocks-a",
+				"RDEPEND" : "!app-misc/blocker-update-order-a",
 			},
 			"app-misc/installed-old-version-blocks-a-2" : {},
 			"app-misc/some-app-a-1": {
@@ -117,7 +115,7 @@ class MergeOrderTestCase(TestCase):
 				"RDEPEND" : "!app-misc/blocker-runtime-a !!app-misc/blocker-runtime-hard-a",
 			},
 			"app-misc/installed-old-version-blocks-a-1" : {
-				"RDEPEND" : "!app-misc/installed-old-version-blocks-a",
+				"RDEPEND" : "!app-misc/blocker-update-order-a",
 			},
 		}
 
@@ -179,8 +177,9 @@ class MergeOrderTestCase(TestCase):
 			# be updated first, in order to solve the blocker without
 			# any need for blocking packages to temporarily overlap.
 			ResolverPlaygroundTestCase(
-				["app-misc/blocker-update-order-a"],
+				["app-misc/blocker-update-order-a", "app-misc/installed-old-version-blocks-a"],
 				success = True,
+				all_permutations = True,
 				mergelist = ["app-misc/installed-old-version-blocks-a-2", "app-misc/blocker-update-order-a-1"]),
 			# installed package has runtime blocker that
 			# should cause it to be uninstalled



^ permalink raw reply related	[flat|nested] 27+ messages in thread

* [gentoo-commits] proj/portage:2.1.9 commit in: pym/portage/tests/resolver/
@ 2011-05-26  6:18 Zac Medico
  0 siblings, 0 replies; 27+ messages in thread
From: Zac Medico @ 2011-05-26  6:18 UTC (permalink / raw
  To: gentoo-commits

commit:     4d77cd685678879d114603196787e2c796df9b2e
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Sun May 22 17:03:05 2011 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Thu May 26 03:51:52 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=4d77cd68

test_depth: use ambiguous_merge_order

---
 pym/portage/tests/resolver/test_depth.py |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/pym/portage/tests/resolver/test_depth.py b/pym/portage/tests/resolver/test_depth.py
index ec3e238..8772acb 100644
--- a/pym/portage/tests/resolver/test_depth.py
+++ b/pym/portage/tests/resolver/test_depth.py
@@ -134,7 +134,8 @@ class ResolverDepthTestCase(TestCase):
 				["virtual/jre"],
 				options = {"--update" : True},
 				success = True,
-				mergelist = ['virtual/jre-1.6.0-r1', 'virtual/jre-1.5.0-r1']),
+				ambiguous_merge_order = True,
+				mergelist = [('virtual/jre-1.6.0-r1', 'virtual/jre-1.5.0-r1')]),
 
 			# Recursively traversed virtual dependencies, and their
 			# direct dependencies, are considered to have the same
@@ -143,7 +144,8 @@ class ResolverDepthTestCase(TestCase):
 				["virtual/jre"],
 				options = {"--update" : True, "--deep" : 1},
 				success = True,
-				mergelist = ['dev-java/icedtea-6.1-r1', 'dev-java/gcj-jdk-4.5-r1', 'virtual/jdk-1.6.0-r1', 'virtual/jdk-1.5.0-r1', 'virtual/jre-1.6.0-r1', 'virtual/jre-1.5.0-r1']),
+				ambiguous_merge_order = True,
+				mergelist = [('dev-java/icedtea-6.1-r1', 'dev-java/gcj-jdk-4.5-r1'), ('virtual/jdk-1.6.0-r1', 'virtual/jdk-1.5.0-r1', 'virtual/jre-1.6.0-r1', 'virtual/jre-1.5.0-r1')]),
 
 			ResolverPlaygroundTestCase(
 				["virtual/jre:1.5"],



^ permalink raw reply related	[flat|nested] 27+ messages in thread

* [gentoo-commits] proj/portage:2.1.9 commit in: pym/portage/tests/resolver/
@ 2011-05-26  6:18 Zac Medico
  0 siblings, 0 replies; 27+ messages in thread
From: Zac Medico @ 2011-05-26  6:18 UTC (permalink / raw
  To: gentoo-commits

commit:     3a80fd6b55d4e697bcacf5c92fca487de13c325f
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Sun May 22 09:05:15 2011 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Thu May 26 03:51:46 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=3a80fd6b

ambiguous_merge_order: set match = False more

---
 pym/portage/tests/resolver/ResolverPlayground.py |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/pym/portage/tests/resolver/ResolverPlayground.py b/pym/portage/tests/resolver/ResolverPlayground.py
index ff50277..4a04dc0 100644
--- a/pym/portage/tests/resolver/ResolverPlayground.py
+++ b/pym/portage/tests/resolver/ResolverPlayground.py
@@ -541,12 +541,14 @@ class ResolverPlaygroundTestCase(object):
 							if got_token == expected_obj:
 								continue
 							# result doesn't match, so stop early
+							match = False
 							break
 						expected_obj = set(expected_obj)
 						try:
 							expected_obj.remove(got_token)
 						except KeyError:
 							# result doesn't match, so stop early
+							match = False
 							break
 						new_expected.append(got_token)
 						while got_stack and expected_obj:



^ permalink raw reply related	[flat|nested] 27+ messages in thread

* [gentoo-commits] proj/portage:2.1.9 commit in: pym/portage/tests/resolver/
@ 2011-05-26  6:18 Zac Medico
  0 siblings, 0 replies; 27+ messages in thread
From: Zac Medico @ 2011-05-26  6:18 UTC (permalink / raw
  To: gentoo-commits

commit:     86d31a19209544e1d72ace3cebc9a8172dd1a64d
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Sun May 22 19:43:03 2011 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Thu May 26 04:19:41 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=86d31a19

test_merge_order: test many-to-one blocks

---
 pym/portage/tests/resolver/ResolverPlayground.py |    5 +++--
 pym/portage/tests/resolver/test_merge_order.py   |   17 +++++++++++------
 2 files changed, 14 insertions(+), 8 deletions(-)

diff --git a/pym/portage/tests/resolver/ResolverPlayground.py b/pym/portage/tests/resolver/ResolverPlayground.py
index 4a04dc0..fed937d 100644
--- a/pym/portage/tests/resolver/ResolverPlayground.py
+++ b/pym/portage/tests/resolver/ResolverPlayground.py
@@ -521,8 +521,9 @@ class ResolverPlaygroundTestCase(object):
 								continue
 							new_expected.append(set())
 							for cpv in obj:
-								a = Atom("="+cpv, allow_repo=True)
-								new_expected[-1].add(a.cpv)
+								if cpv[:1] != "!":
+									cpv = Atom("="+cpv, allow_repo=True).cpv
+								new_expected[-1].add(cpv)
 						expected = new_expected
 				if self.ignore_mergelist_order and got is not None:
 					got = set(got)

diff --git a/pym/portage/tests/resolver/test_merge_order.py b/pym/portage/tests/resolver/test_merge_order.py
index fdbfcb5..2df3a99 100644
--- a/pym/portage/tests/resolver/test_merge_order.py
+++ b/pym/portage/tests/resolver/test_merge_order.py
@@ -19,6 +19,7 @@ class MergeOrderTestCase(TestCase):
 			},
 			"app-misc/blocker-update-order-a-1" : {},
 			"app-misc/blocker-runtime-a-1" : {},
+			"app-misc/blocker-runtime-b-1" : {},
 			"app-misc/blocker-runtime-hard-a-1" : {},
 			"app-misc/circ-buildtime-a-0": {},
 			"app-misc/circ-buildtime-a-1": {
@@ -80,7 +81,7 @@ class MergeOrderTestCase(TestCase):
 			"app-misc/installed-blocker-a-1" : {
 				"EAPI"   : "2",
 				"DEPEND" : "!app-misc/blocker-buildtime-a",
-				"RDEPEND" : "!app-misc/blocker-runtime-a !!app-misc/blocker-runtime-hard-a",
+				"RDEPEND" : "!app-misc/blocker-runtime-a !app-misc/blocker-runtime-b !!app-misc/blocker-runtime-hard-a",
 			},
 			"app-misc/installed-old-version-blocks-a-1" : {
 				"RDEPEND" : "!app-misc/blocker-update-order-a",
@@ -112,7 +113,7 @@ class MergeOrderTestCase(TestCase):
 			"app-misc/installed-blocker-a-1" : {
 				"EAPI"   : "2",
 				"DEPEND" : "!app-misc/blocker-buildtime-a",
-				"RDEPEND" : "!app-misc/blocker-runtime-a !!app-misc/blocker-runtime-hard-a",
+				"RDEPEND" : "!app-misc/blocker-runtime-a !app-misc/blocker-runtime-b !!app-misc/blocker-runtime-hard-a",
 			},
 			"app-misc/installed-old-version-blocks-a-1" : {
 				"RDEPEND" : "!app-misc/blocker-update-order-a",
@@ -181,13 +182,17 @@ class MergeOrderTestCase(TestCase):
 				success = True,
 				all_permutations = True,
 				mergelist = ["app-misc/installed-old-version-blocks-a-2", "app-misc/blocker-update-order-a-1"]),
-			# installed package has runtime blocker that
-			# should cause it to be uninstalled
+			# The installed package has runtime blockers that
+			# should cause it to be uninstalled. The uninstall
+			# task is executed only after blocking packages have
+			# been merged.
 			# TODO: distinguish between install/uninstall tasks in mergelist
 			ResolverPlaygroundTestCase(
-				["app-misc/blocker-runtime-a"],
+				["app-misc/blocker-runtime-a", "app-misc/blocker-runtime-b"],
 				success = True,
-				mergelist = ["app-misc/blocker-runtime-a-1", "app-misc/installed-blocker-a-1", "!app-misc/blocker-runtime-a"]),
+				all_permutations = True,
+				ambiguous_merge_order = True,
+				mergelist = [("app-misc/blocker-runtime-a-1", "app-misc/blocker-runtime-b-1"), "app-misc/installed-blocker-a-1", ("!app-misc/blocker-runtime-a", "!app-misc/blocker-runtime-b")]),
 			# We have a soft buildtime blocker against an installed
 			# package that should cause it to be uninstalled. Note that with
 			# soft blockers, the blocking packages are allowed to temporarily



^ permalink raw reply related	[flat|nested] 27+ messages in thread

* [gentoo-commits] proj/portage:2.1.9 commit in: pym/portage/tests/resolver/
@ 2011-05-26  6:18 Zac Medico
  0 siblings, 0 replies; 27+ messages in thread
From: Zac Medico @ 2011-05-26  6:18 UTC (permalink / raw
  To: gentoo-commits

commit:     fc9b11ac053a6b21e4b861e05b2ab2dd9af8dc4f
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Sun May 22 21:01:18 2011 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Thu May 26 04:20:25 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=fc9b11ac

test_merge_order: test asap PORTAGE_PACKAGE_ATOM

---
 pym/portage/tests/resolver/test_merge_order.py |   22 ++++++++++++++++++++++
 1 files changed, 22 insertions(+), 0 deletions(-)

diff --git a/pym/portage/tests/resolver/test_merge_order.py b/pym/portage/tests/resolver/test_merge_order.py
index 105f869..2a4dbc3 100644
--- a/pym/portage/tests/resolver/test_merge_order.py
+++ b/pym/portage/tests/resolver/test_merge_order.py
@@ -1,6 +1,7 @@
 # Copyright 2011 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
+import portage
 from portage.tests import TestCase
 from portage.tests.resolver.ResolverPlayground import (ResolverPlayground,
 	ResolverPlaygroundTestCase)
@@ -111,6 +112,16 @@ class MergeOrderTestCase(TestCase):
 			"app-misc/some-app-c-1": {
 				"RDEPEND": "app-misc/circ-buildtime-a app-misc/circ-buildtime-b",
 			},
+			"sys-apps/portage-2.1.9.42" : {
+				"DEPEND"  : "dev-lang/python",
+				"RDEPEND" : "dev-lang/python",
+			},
+			"sys-apps/portage-2.1.9.49" : {
+				"DEPEND"  : "dev-lang/python",
+				"RDEPEND" : "dev-lang/python",
+			},
+			"dev-lang/python-3.1" : {},
+			"dev-lang/python-3.2" : {},
 		}
 
 		installed = {
@@ -141,6 +152,11 @@ class MergeOrderTestCase(TestCase):
 				"EAPI"    : "2",
 				"RDEPEND" : "!!app-misc/blocker-update-order-hard-unsolvable-a",
 			},
+			"sys-apps/portage-2.1.9.42" : {
+				"DEPEND"  : "dev-lang/python",
+				"RDEPEND" : "dev-lang/python",
+			},
+			"dev-lang/python-3.1" : {},
 		}
 
 		test_cases = (
@@ -263,6 +279,12 @@ class MergeOrderTestCase(TestCase):
 				["app-misc/blocker-runtime-hard-a"],
 				success = False,
 				mergelist = ['app-misc/blocker-runtime-hard-a-1', '!!app-misc/blocker-runtime-hard-a']),
+			# Test that PORTAGE_PACKAGE_ATOM is merged asap.
+			ResolverPlaygroundTestCase(
+				["dev-lang/python", portage.const.PORTAGE_PACKAGE_ATOM],
+				success = True,
+				all_permutations = True,
+				mergelist = ['sys-apps/portage-2.1.9.49', 'dev-lang/python-3.2']),
 		)
 
 		playground = ResolverPlayground(ebuilds=ebuilds, installed=installed)



^ permalink raw reply related	[flat|nested] 27+ messages in thread

* [gentoo-commits] proj/portage:2.1.9 commit in: pym/portage/tests/resolver/
@ 2011-05-26  6:18 Zac Medico
  0 siblings, 0 replies; 27+ messages in thread
From: Zac Medico @ 2011-05-26  6:18 UTC (permalink / raw
  To: gentoo-commits

commit:     e780a5060db17a7fdcb9fccd08d65b70f5e1162d
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Sun May 22 20:02:26 2011 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Thu May 26 04:19:54 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=e780a506

test_merge_order: test hard block resolution

---
 pym/portage/tests/resolver/test_merge_order.py |   18 ++++++++++++++++++
 1 files changed, 18 insertions(+), 0 deletions(-)

diff --git a/pym/portage/tests/resolver/test_merge_order.py b/pym/portage/tests/resolver/test_merge_order.py
index 2df3a99..1904d5c 100644
--- a/pym/portage/tests/resolver/test_merge_order.py
+++ b/pym/portage/tests/resolver/test_merge_order.py
@@ -18,6 +18,7 @@ class MergeOrderTestCase(TestCase):
 				"DEPEND" : "!!app-misc/installed-blocker-a",
 			},
 			"app-misc/blocker-update-order-a-1" : {},
+			"app-misc/blocker-update-order-hard-a-1" : {},
 			"app-misc/blocker-runtime-a-1" : {},
 			"app-misc/blocker-runtime-b-1" : {},
 			"app-misc/blocker-runtime-hard-a-1" : {},
@@ -87,6 +88,11 @@ class MergeOrderTestCase(TestCase):
 				"RDEPEND" : "!app-misc/blocker-update-order-a",
 			},
 			"app-misc/installed-old-version-blocks-a-2" : {},
+			"app-misc/installed-old-version-blocks-hard-a-1" : {
+				"EAPI"    : "2",
+				"RDEPEND" : "!!app-misc/blocker-update-order-hard-a",
+			},
+			"app-misc/installed-old-version-blocks-hard-a-2" : {},
 			"app-misc/some-app-a-1": {
 				"RDEPEND": "app-misc/circ-runtime-a app-misc/circ-runtime-b",
 			},
@@ -118,6 +124,10 @@ class MergeOrderTestCase(TestCase):
 			"app-misc/installed-old-version-blocks-a-1" : {
 				"RDEPEND" : "!app-misc/blocker-update-order-a",
 			},
+			"app-misc/installed-old-version-blocks-hard-a-1" : {
+				"EAPI"    : "2",
+				"RDEPEND" : "!!app-misc/blocker-update-order-hard-a",
+			},
 		}
 
 		test_cases = (
@@ -182,6 +192,14 @@ class MergeOrderTestCase(TestCase):
 				success = True,
 				all_permutations = True,
 				mergelist = ["app-misc/installed-old-version-blocks-a-2", "app-misc/blocker-update-order-a-1"]),
+			# This is the same as above but with a hard blocker. The hard
+			# blocker is solved automatically since the update makes it
+			# irrelevant.
+			ResolverPlaygroundTestCase(
+				["app-misc/blocker-update-order-hard-a", "app-misc/installed-old-version-blocks-hard-a"],
+				success = True,
+				all_permutations = True,
+				mergelist = ["app-misc/installed-old-version-blocks-hard-a-2", "app-misc/blocker-update-order-hard-a-1"]),
 			# The installed package has runtime blockers that
 			# should cause it to be uninstalled. The uninstall
 			# task is executed only after blocking packages have



^ permalink raw reply related	[flat|nested] 27+ messages in thread

* [gentoo-commits] proj/portage:2.1.9 commit in: pym/portage/tests/resolver/
@ 2011-05-26  6:18 Zac Medico
  0 siblings, 0 replies; 27+ messages in thread
From: Zac Medico @ 2011-05-26  6:18 UTC (permalink / raw
  To: gentoo-commits

commit:     04fd097e89595f641955808aa5e3b886fdc52ba8
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Sun May 22 20:36:18 2011 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Thu May 26 04:20:09 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=04fd097e

test_merge_order: test case for bug 250286

---
 pym/portage/tests/resolver/test_merge_order.py |   28 ++++++++++++++++++++++++
 1 files changed, 28 insertions(+), 0 deletions(-)

diff --git a/pym/portage/tests/resolver/test_merge_order.py b/pym/portage/tests/resolver/test_merge_order.py
index 1904d5c..105f869 100644
--- a/pym/portage/tests/resolver/test_merge_order.py
+++ b/pym/portage/tests/resolver/test_merge_order.py
@@ -19,6 +19,7 @@ class MergeOrderTestCase(TestCase):
 			},
 			"app-misc/blocker-update-order-a-1" : {},
 			"app-misc/blocker-update-order-hard-a-1" : {},
+			"app-misc/blocker-update-order-hard-unsolvable-a-1" : {},
 			"app-misc/blocker-runtime-a-1" : {},
 			"app-misc/blocker-runtime-b-1" : {},
 			"app-misc/blocker-runtime-hard-a-1" : {},
@@ -93,6 +94,14 @@ class MergeOrderTestCase(TestCase):
 				"RDEPEND" : "!!app-misc/blocker-update-order-hard-a",
 			},
 			"app-misc/installed-old-version-blocks-hard-a-2" : {},
+			"app-misc/installed-old-version-blocks-hard-unsolvable-a-1" : {
+				"EAPI"    : "2",
+				"RDEPEND" : "!!app-misc/blocker-update-order-hard-unsolvable-a",
+			},
+			"app-misc/installed-old-version-blocks-hard-unsolvable-a-2" : {
+				"DEPEND"  : "app-misc/blocker-update-order-hard-unsolvable-a",
+				"RDEPEND" : "",
+			},
 			"app-misc/some-app-a-1": {
 				"RDEPEND": "app-misc/circ-runtime-a app-misc/circ-runtime-b",
 			},
@@ -128,6 +137,10 @@ class MergeOrderTestCase(TestCase):
 				"EAPI"    : "2",
 				"RDEPEND" : "!!app-misc/blocker-update-order-hard-a",
 			},
+			"app-misc/installed-old-version-blocks-hard-unsolvable-a-1" : {
+				"EAPI"    : "2",
+				"RDEPEND" : "!!app-misc/blocker-update-order-hard-unsolvable-a",
+			},
 		}
 
 		test_cases = (
@@ -200,6 +213,21 @@ class MergeOrderTestCase(TestCase):
 				success = True,
 				all_permutations = True,
 				mergelist = ["app-misc/installed-old-version-blocks-hard-a-2", "app-misc/blocker-update-order-hard-a-1"]),
+			# This is similar to the above case except that it's unsolvable
+			# due to merge order, unless bug 250286 is implemented so that
+			# the installed blocker will be unmerged before installation
+			# of the package it blocks (rather than after like a soft blocker
+			# would be handled). The "unmerge before" behavior requested
+			# in bug 250286 must be optional since essential programs or
+			# libraries may be temporarily unavailable during a
+			# non-overlapping update like this.
+			ResolverPlaygroundTestCase(
+				["app-misc/blocker-update-order-hard-unsolvable-a", "app-misc/installed-old-version-blocks-hard-unsolvable-a"],
+				success = False,
+				all_permutations = True,
+				ambiguous_merge_order = True,
+				merge_order_assertions = (('app-misc/blocker-update-order-hard-unsolvable-a-1', 'app-misc/installed-old-version-blocks-hard-unsolvable-a-2'),),
+				mergelist = [('app-misc/blocker-update-order-hard-unsolvable-a-1', 'app-misc/installed-old-version-blocks-hard-unsolvable-a-2', '!!app-misc/blocker-update-order-hard-unsolvable-a')]),
 			# The installed package has runtime blockers that
 			# should cause it to be uninstalled. The uninstall
 			# task is executed only after blocking packages have



^ permalink raw reply related	[flat|nested] 27+ messages in thread

* [gentoo-commits] proj/portage:2.1.9 commit in: pym/portage/tests/resolver/
@ 2011-05-26  6:18 Zac Medico
  0 siblings, 0 replies; 27+ messages in thread
From: Zac Medico @ 2011-05-26  6:18 UTC (permalink / raw
  To: gentoo-commits

commit:     61ecd510191e27feeac191648df028c5c9cfd8ed
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Sun May 22 22:01:21 2011 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Thu May 26 04:20:47 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=61ecd510

test_merge_order: test asap LIBC_PACKAGE_ATOM

---
 pym/portage/tests/resolver/test_merge_order.py |   44 ++++++++++++++++++++++++
 1 files changed, 44 insertions(+), 0 deletions(-)

diff --git a/pym/portage/tests/resolver/test_merge_order.py b/pym/portage/tests/resolver/test_merge_order.py
index 2a4dbc3..1b7cddd 100644
--- a/pym/portage/tests/resolver/test_merge_order.py
+++ b/pym/portage/tests/resolver/test_merge_order.py
@@ -122,6 +122,26 @@ class MergeOrderTestCase(TestCase):
 			},
 			"dev-lang/python-3.1" : {},
 			"dev-lang/python-3.2" : {},
+			"virtual/libc-0" : {
+				"RDEPEND" : "sys-libs/glibc",
+			},
+			"sys-libs/glibc-2.11" : {
+				"DEPEND" : "virtual/os-headers",
+			},
+			"sys-libs/glibc-2.13" : {
+				"DEPEND" : "virtual/os-headers",
+			},
+			"virtual/os-headers-0" : {
+				"RDEPEND" : "sys-kernel/linux-headers",
+			},
+			"sys-kernel/linux-headers-2.6.38": {
+				"DEPEND" : "app-arch/xz-utils",
+			},
+			"sys-kernel/linux-headers-2.6.39": {
+				"DEPEND" : "app-arch/xz-utils",
+			},
+			"app-arch/xz-utils-5.0.1" : {},
+			"app-arch/xz-utils-5.0.2" : {},
 		}
 
 		installed = {
@@ -157,6 +177,19 @@ class MergeOrderTestCase(TestCase):
 				"RDEPEND" : "dev-lang/python",
 			},
 			"dev-lang/python-3.1" : {},
+			"virtual/libc-0" : {
+				"RDEPEND" : "sys-libs/glibc",
+			},
+			"sys-libs/glibc-2.11" : {
+				"DEPEND" : "virtual/os-headers",
+			},
+			"virtual/os-headers-0" : {
+				"RDEPEND" : "sys-kernel/linux-headers",
+			},
+			"sys-kernel/linux-headers-2.6.38": {
+				"DEPEND" : "app-arch/xz-utils",
+			},
+			"app-arch/xz-utils-5.0.1" : {},
 		}
 
 		test_cases = (
@@ -285,6 +318,17 @@ class MergeOrderTestCase(TestCase):
 				success = True,
 				all_permutations = True,
 				mergelist = ['sys-apps/portage-2.1.9.49', 'dev-lang/python-3.2']),
+			# Test that OS_HEADERS_PACKAGE_ATOM and LIBC_PACKAGE_ATOM
+			# are merged asap, in order to account for implicit
+			# dependencies. See bug #303567.
+			# TODO: optimize this to ensure that glibc comes before xz-utils
+			ResolverPlaygroundTestCase(
+				["app-arch/xz-utils", "sys-kernel/linux-headers", "sys-libs/glibc"],
+				options = {"--complete-graph" : True},
+				success = True,
+				all_permutations = True,
+				ambiguous_merge_order = True,
+				mergelist = ['sys-kernel/linux-headers-2.6.39', ('app-arch/xz-utils-5.0.2', 'sys-libs/glibc-2.13')]),
 		)
 
 		playground = ResolverPlayground(ebuilds=ebuilds, installed=installed)



^ permalink raw reply related	[flat|nested] 27+ messages in thread

* [gentoo-commits] proj/portage:2.1.9 commit in: pym/portage/tests/resolver/
@ 2011-05-26  6:18 Zac Medico
  0 siblings, 0 replies; 27+ messages in thread
From: Zac Medico @ 2011-05-26  6:18 UTC (permalink / raw
  To: gentoo-commits

commit:     546eb07ffe3d19e127b8c3757608cb91261a197c
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Mon May 23 00:44:49 2011 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Thu May 26 04:25:04 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=546eb07f

test_depth: use merge_order_assertions

---
 pym/portage/tests/resolver/test_depth.py |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/pym/portage/tests/resolver/test_depth.py b/pym/portage/tests/resolver/test_depth.py
index 8772acb..cb1e2dd 100644
--- a/pym/portage/tests/resolver/test_depth.py
+++ b/pym/portage/tests/resolver/test_depth.py
@@ -145,7 +145,9 @@ class ResolverDepthTestCase(TestCase):
 				options = {"--update" : True, "--deep" : 1},
 				success = True,
 				ambiguous_merge_order = True,
-				mergelist = [('dev-java/icedtea-6.1-r1', 'dev-java/gcj-jdk-4.5-r1'), ('virtual/jdk-1.6.0-r1', 'virtual/jdk-1.5.0-r1', 'virtual/jre-1.6.0-r1', 'virtual/jre-1.5.0-r1')]),
+				merge_order_assertions=(('dev-java/icedtea-6.1-r1', 'virtual/jdk-1.6.0-r1'), ('virtual/jdk-1.6.0-r1', 'virtual/jre-1.6.0-r1'),
+					('dev-java/gcj-jdk-4.5-r1', 'virtual/jdk-1.5.0-r1'), ('virtual/jdk-1.5.0-r1', 'virtual/jre-1.5.0-r1')),
+				mergelist = [('dev-java/icedtea-6.1-r1', 'dev-java/gcj-jdk-4.5-r1', 'virtual/jdk-1.6.0-r1', 'virtual/jdk-1.5.0-r1', 'virtual/jre-1.6.0-r1', 'virtual/jre-1.5.0-r1')]),
 
 			ResolverPlaygroundTestCase(
 				["virtual/jre:1.5"],



^ permalink raw reply related	[flat|nested] 27+ messages in thread

* [gentoo-commits] proj/portage:2.1.9 commit in: pym/portage/tests/resolver/
@ 2011-05-26  6:18 Zac Medico
  0 siblings, 0 replies; 27+ messages in thread
From: Zac Medico @ 2011-05-26  6:18 UTC (permalink / raw
  To: gentoo-commits

commit:     59736cd3b6695277dce6337603a6843af9a24fbc
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Mon May 23 05:59:16 2011 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Thu May 26 04:25:49 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=59736cd3

test_merge_order: add more asap libc deps

---
 pym/portage/tests/resolver/test_merge_order.py |   18 ++++++++++++------
 1 files changed, 12 insertions(+), 6 deletions(-)

diff --git a/pym/portage/tests/resolver/test_merge_order.py b/pym/portage/tests/resolver/test_merge_order.py
index 1057300..ba3d9b4 100644
--- a/pym/portage/tests/resolver/test_merge_order.py
+++ b/pym/portage/tests/resolver/test_merge_order.py
@@ -126,12 +126,15 @@ class MergeOrderTestCase(TestCase):
 			"virtual/libc-0" : {
 				"RDEPEND" : "sys-libs/glibc",
 			},
+			"sys-devel/gcc-4.5.2" : {},
+			"sys-devel/binutils-2.18" : {},
+			"sys-devel/binutils-2.20.1" : {},
 			"sys-libs/glibc-2.11" : {
-				"DEPEND" : "virtual/os-headers",
+				"DEPEND" : "virtual/os-headers sys-devel/gcc sys-devel/binutils",
 				"RDEPEND": "",
 			},
 			"sys-libs/glibc-2.13" : {
-				"DEPEND" : "virtual/os-headers",
+				"DEPEND" : "virtual/os-headers sys-devel/gcc sys-devel/binutils",
 				"RDEPEND": "",
 			},
 			"virtual/os-headers-0" : {
@@ -185,8 +188,9 @@ class MergeOrderTestCase(TestCase):
 			"virtual/libc-0" : {
 				"RDEPEND" : "sys-libs/glibc",
 			},
+			"sys-devel/binutils-2.18" : {},
 			"sys-libs/glibc-2.11" : {
-				"DEPEND" : "virtual/os-headers",
+				"DEPEND" : "virtual/os-headers sys-devel/gcc sys-devel/binutils",
 				"RDEPEND": "",
 			},
 			"virtual/os-headers-0" : {
@@ -329,13 +333,15 @@ class MergeOrderTestCase(TestCase):
 				mergelist = ['app-admin/eselect-python-20100321', 'sys-apps/portage-2.1.9.49', 'dev-lang/python-3.2']),
 			# Test that OS_HEADERS_PACKAGE_ATOM and LIBC_PACKAGE_ATOM
 			# are merged asap, in order to account for implicit
-			# dependencies. See bug #303567.
+			# dependencies. See bug #303567. Optimally, satisfied deps
+			# are always merged after the asap nodes that depend on them.
 			ResolverPlaygroundTestCase(
-				["app-arch/xz-utils", "sys-kernel/linux-headers", "sys-libs/glibc"],
+				["app-arch/xz-utils", "sys-kernel/linux-headers", "sys-devel/binutils", "sys-libs/glibc"],
 				options = {"--complete-graph" : True},
 				success = True,
 				all_permutations = True,
-				mergelist = ['sys-kernel/linux-headers-2.6.39', 'sys-libs/glibc-2.13', 'app-arch/xz-utils-5.0.2']),
+				ambiguous_merge_order = True,
+				mergelist = ['sys-kernel/linux-headers-2.6.39', 'sys-devel/gcc-4.5.2', 'sys-libs/glibc-2.13', ('app-arch/xz-utils-5.0.2', 'sys-devel/binutils-2.20.1')]),
 		)
 
 		playground = ResolverPlayground(ebuilds=ebuilds, installed=installed)



^ permalink raw reply related	[flat|nested] 27+ messages in thread

end of thread, other threads:[~2011-05-26  6:26 UTC | newest]

Thread overview: 27+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-05-26  6:18 [gentoo-commits] proj/portage:2.1.9 commit in: pym/portage/tests/resolver/ Zac Medico
  -- strict thread matches above, loose matches on Subject: below --
2011-05-26  6:18 Zac Medico
2011-05-26  6:18 Zac Medico
2011-05-26  6:18 Zac Medico
2011-05-26  6:18 Zac Medico
2011-05-26  6:18 Zac Medico
2011-05-26  6:18 Zac Medico
2011-05-26  6:18 Zac Medico
2011-05-26  6:18 Zac Medico
2011-05-26  6:18 Zac Medico
2011-05-26  6:18 Zac Medico
2011-05-26  6:18 Zac Medico
2011-05-26  6:18 Zac Medico
2011-05-26  6:18 Zac Medico
2011-05-26  6:18 Zac Medico
2011-05-26  6:18 Zac Medico
2011-05-26  6:18 Zac Medico
2011-05-26  6:18 Zac Medico
2011-05-26  6:18 Zac Medico
2011-05-26  6:18 Zac Medico
2011-05-26  6:18 Zac Medico
2011-05-26  6:18 Zac Medico
2011-05-26  6:18 Zac Medico
2011-02-20  0:04 Zac Medico
2011-02-14  4:31 Zac Medico
2011-02-14  4:31 Zac Medico
2011-02-14  4:31 Zac Medico

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox