diff options
author | Zac Medico <zmedico@gentoo.org> | 2010-07-19 15:49:05 -0700 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2010-07-19 15:49:05 -0700 |
commit | 9eff4fa6377b693f742fdc2bb3720a66375bc6ec (patch) | |
tree | 69788e25790fd65d548465c42794e371a47a7f63 | |
parent | 1ae5c2e55e0c5f06f76c7da895da5ddb035a2f0b (diff) | |
download | portage-9eff4fa6377b693f742fdc2bb3720a66375bc6ec.tar.gz portage-9eff4fa6377b693f742fdc2bb3720a66375bc6ec.tar.bz2 portage-9eff4fa6377b693f742fdc2bb3720a66375bc6ec.zip |
Bug #328317 - If libc is artifically promoted in the merge list
(for bug #303567), promote os-headers before it.
-rw-r--r-- | pym/_emerge/depgraph.py | 13 | ||||
-rw-r--r-- | pym/portage/const.py | 1 |
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", |