Bug #328317 - If libc is artifically promoted in the merge list
authorZac Medico <zmedico@gentoo.org>
Mon, 19 Jul 2010 22:49:05 +0000 (15:49 -0700)
committerZac Medico <zmedico@gentoo.org>
Mon, 19 Jul 2010 22:49:05 +0000 (15:49 -0700)
(for bug #303567), promote os-headers before it.

pym/_emerge/depgraph.py
pym/portage/const.py

index a466e7d89efc1686bd7afd8ce0032061934da958..8931bd9f0cbd12955310b456b78f7327850d9e41 100644 (file)
@@ -3531,6 +3531,19 @@ class depgraph(object):
                                        # Only add a dep when the version changes.
                                        if not libc_pkg.root_config.trees[
                                                'vartree'].dbapi.cpv_exists(libc_pkg.cpv):
+
+                                               # If there's also an os-headers upgrade, we need to
+                                               # pull that in first. See bug #328317.
+                                               os_headers_pkg = self._dynamic_config.mydbapi[root].match_pkgs(
+                                                       portage.const.OS_HEADERS_PACKAGE_ATOM)
+                                               if os_headers_pkg:
+                                                       os_headers_pkg = os_headers_pkg[0]
+                                                       if os_headers_pkg.operation == 'merge':
+                                                               # Only add a dep when the version changes.
+                                                               if not os_headers_pkg.root_config.trees[
+                                                                       'vartree'].dbapi.cpv_exists(os_headers_pkg.cpv):
+                                                                       asap_nodes.append(os_headers_pkg)
+
                                                asap_nodes.append(libc_pkg)
 
                def gather_deps(ignore_priority, mergeable_nodes,
index 32e7b40a5e6daf3079f5074a033923c2e41bdea8..5c0901b35ea485c71daf90c93ef6b30fedaa822e 100644 (file)
@@ -72,6 +72,7 @@ REPO_NAME_LOC            = "profiles" + "/" + REPO_NAME_FILE
 
 PORTAGE_PACKAGE_ATOM     = "sys-apps/portage"
 LIBC_PACKAGE_ATOM        = "virtual/libc"
+OS_HEADERS_PACKAGE_ATOM  = "virtual/os-headers"
 
 INCREMENTALS             = ("USE", "USE_EXPAND", "USE_EXPAND_HIDDEN",
                            "FEATURES", "ACCEPT_KEYWORDS",