Merged from trunk -r14906:14916
authorFabian Groffen <grobian@gentoo.org>
Sun, 6 Dec 2009 10:31:36 +0000 (10:31 -0000)
committerFabian Groffen <grobian@gentoo.org>
Sun, 6 Dec 2009 10:31:36 +0000 (10:31 -0000)
   | 14907   | Bug #294886 - Show some basic info at the beginning of the   |
   | zmedico | build log, including USE flags.                              |

   | 14909   | In FakeVartree.sync(), skip the aux_get wrapper when         |
   | zmedico | populating old-style virtuals, in order to avoid unwanted    |
   |         | cache generation with --nodeps (reported by Arfrever).       |

   | 14913   | Revert r14901 since it doesn't solve the problem (bug        |
   | zmedico | #294945).                                                    |

   | 14914   | Bug #294945 - Fix blocker satistfied state handling inside   |
   | zmedico | depgraph, to avoid a KeyError when displaying blockers.      |

   | 14915   | Fix deprecated usage of dep_getkey(). Thanks to Sebastian    |
   | zmedico | Mingramm (few) for reporting.                                |

svn path=/main/branches/prefix/; revision=14938

bin/ebuild.sh
pym/_emerge/FakeVartree.py
pym/_emerge/depgraph.py
pym/portage/__init__.py

index 13fe2c4b131a60556560f78e04f6b136236c8689..6062146a983255b7716e4a8a79a61f99ccf4a51e 100755 (executable)
@@ -2062,6 +2062,11 @@ ebuild_main() {
                export SANDBOX_ON="0"
                ;;
        help|pretend|setup|preinst)
+               if [[ $EBUILD_SH_ARGS = setup ]] ; then
+                       einfo "CPV:  $CATEGORY/$PF"
+                       einfo "REPO: $PORTAGE_REPO_NAME"
+                       einfo "USE:  $USE"
+               fi
                #pkg_setup needs to be out of the sandbox for tmp file creation;
                #for example, awking and piping a file in /tmp requires a temp file to be created
                #in /etc.  If pkg_setup is in the sandbox, both our lilo and apache ebuilds break.
index 3a9d5d639110617445a0e534fa60556b59305f08..728d44a715bba752af540604af4d8c8c86c8401c 100644 (file)
@@ -106,7 +106,13 @@ class FakeVartree(portage.vartree):
 
                # Populate the old-style virtuals using the cached values.
                if not self.settings.treeVirtuals:
-                       self.settings._populate_treeVirtuals(self)
+                       # Skip the aux_get wrapper here, to avoid unwanted
+                       # cache generation.
+                       try:
+                               self.dbapi.aux_get = self._aux_get
+                               self.settings._populate_treeVirtuals(self)
+                       finally:
+                               self.dbapi.aux_get = self._aux_get_wrapper
 
        def _sync(self):
 
index eb8121053c7a51ce0b8a7d0191f7e70d13f0269f..4608404a8c21726b26b14034ce8d79b149cb0132 100644 (file)
@@ -3775,16 +3775,12 @@ class depgraph(object):
                                        # it serves as an indicator that blocking packages
                                        # will be temporarily installed simultaneously.
                                        for blocker in solved_blockers:
-                                               blocker.satisfied = True
                                                retlist.append(blocker)
 
                unsolvable_blockers = set(self._dynamic_config._unsolvable_blockers.leaf_nodes())
                for node in myblocker_uninstalls.root_nodes():
                        unsolvable_blockers.add(node)
 
-               for blocker in unsolvable_blockers:
-                       retlist.append(blocker)
-
                # If any Uninstall tasks need to be executed in order
                # to avoid a conflict, complete the graph with any
                # dependencies that may have been initially
@@ -3796,6 +3792,16 @@ class depgraph(object):
                        self._dynamic_config.myparams["complete"] = True
                        raise self._serialize_tasks_retry("")
 
+               # Set satisfied state on blockers, but not before the
+               # above retry path, since we don't want to modify the
+               # state in that case.
+               for node in retlist:
+                       if isinstance(node, Blocker):
+                               node.satisfied = True
+
+               for blocker in unsolvable_blockers:
+                       retlist.append(blocker)
+
                if unsolvable_blockers and \
                        not self._accept_blocker_conflicts():
                        self._dynamic_config._unsatisfied_blockers_for_display = unsolvable_blockers
@@ -4691,11 +4697,7 @@ class depgraph(object):
                                        # an argument or a direct member of a set that has
                                        # been specified as an argument (system or world).
                                        if current_node not in self._dynamic_config._set_nodes:
-                                               try:
-                                                       parent_nodes = mygraph.parent_nodes(current_node)
-                                               except KeyError:
-                                                       # This can happen sometimes for blockers.
-                                                       pass
+                                               parent_nodes = mygraph.parent_nodes(current_node)
                                        if parent_nodes:
                                                child_nodes = set(mygraph.child_nodes(current_node))
                                                selected_parent = None
index 58d1bd6741589692e4ee88b2918374e247a72d6b..16202968bf4e7fc3e5a308fd4e0e05ddc5c4b682 100644 (file)
@@ -2852,7 +2852,7 @@ class config(object):
        def _getUseMask(self, pkg):
                cp = getattr(pkg, "cp", None)
                if cp is None:
-                       cp = dep_getkey(pkg)
+                       cp = cpv_getkey(dep.remove_slot(pkg))
                usemask = []
                pos = 0
                for i, pusemask_dict in enumerate(self.pusemask_list):
@@ -2875,7 +2875,7 @@ class config(object):
        def _getUseForce(self, pkg):
                cp = getattr(pkg, "cp", None)
                if cp is None:
-                       cp = dep_getkey(pkg)
+                       cp = cpv_getkey(dep.remove_slot(pkg))
                useforce = []
                pos = 0
                for i, puseforce_dict in enumerate(self.puseforce_list):