summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--pym/_emerge/depgraph.py13
-rw-r--r--pym/portage/const.py1
2 files changed, 14 insertions, 0 deletions
diff --git a/pym/_emerge/depgraph.py b/pym/_emerge/depgraph.py
index a466e7d89..8931bd9f0 100644
--- a/pym/_emerge/depgraph.py
+++ b/pym/_emerge/depgraph.py
@@ -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,
diff --git a/pym/portage/const.py b/pym/portage/const.py
index 32e7b40a5..5c0901b35 100644
--- a/pym/portage/const.py
+++ b/pym/portage/const.py
@@ -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",