test_merge_order: test asap LIBC_PACKAGE_ATOM
authorZac Medico <zmedico@gentoo.org>
Sun, 22 May 2011 22:01:21 +0000 (15:01 -0700)
committerZac Medico <zmedico@gentoo.org>
Sun, 22 May 2011 22:01:21 +0000 (15:01 -0700)
pym/portage/tests/resolver/test_merge_order.py

index 2a4dbc3d9b50d162aa373fe4c7d4c5283ec0ffbe..1b7cdddcdc6012eaa04d63e2f460e81538fa15d5 100644 (file)
@@ -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)