From: Zac Medico Date: Mon, 19 Jul 2010 22:49:05 +0000 (-0700) Subject: Bug #328317 - If libc is artifically promoted in the merge list X-Git-Tag: v2.2_rc68~485 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=9eff4fa6377b693f742fdc2bb3720a66375bc6ec;p=portage.git Bug #328317 - If libc is artifically promoted in the merge list (for bug #303567), promote os-headers before it. --- 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",