From: Zac Medico Date: Fri, 27 Jun 2008 20:58:40 +0000 (-0000) Subject: Generate and log eerror messages for any packages that need to be dropped X-Git-Tag: v2.2_rc2~308 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=574e96418dcfb2eb7e1016058bb329af0ae6d8bc;p=portage.git Generate and log eerror messages for any packages that need to be dropped due to unsatisfied dependencies when --keep-going is enabled. svn path=/main/trunk/; revision=10817 --- diff --git a/pym/_emerge/__init__.py b/pym/_emerge/__init__.py index 7588783ed..bd579ce9b 100644 --- a/pym/_emerge/__init__.py +++ b/pym/_emerge/__init__.py @@ -52,6 +52,7 @@ import portage.util import portage.locks import portage.exception from portage.data import secpass +from portage.elog.messages import eerror from portage.util import normalize_path as normpath from portage.util import writemsg from portage.sets import load_default_config, SETPREFIX @@ -5958,15 +5959,40 @@ class MergeTask(object): break if mergelist[0][-1] != "merge": break + # Skip the first one because it failed to build or install. + pkg_key = tuple(mergelist[0]) del mergelist[0] + failed_pkg = None + for task in self._mergelist: + if task == pkg_key: + failed_pkg = task + break + if failed_pkg is None: + break if not mergelist: break - mylist = self._calc_resume_list() + + mylist, dropped_tasks = self._calc_resume_list() clear_caches(self.trees) if not mylist: break - self.curval += 1 + + if dropped_tasks: + + def _eerror(lines): + for l in lines: + eerror(l, phase="other", key=failed_pkg.cpv) + + msg = [] + msg.append("One or more packages have been " + \ + "dropped due to unsatisfied dependencies:") + msg.append("") + msg.extend(" " + str(task) for task in dropped_tasks) + msg.append("") + _eerror(msg) + del _eerror, msg + del dropped_tasks self._mergelist = mylist return rval @@ -5994,20 +6020,12 @@ class MergeTask(object): if not success: mydepgraph.display_problems() - return None - - if dropped_tasks: - portage.writemsg("!!! One or more packages have been " + \ - "dropped due to\n" + \ - "!!! masking or unsatisfied dependencies:\n\n", - noiselevel=-1) - for task in dropped_tasks: - portage.writemsg(" " + str(task) + "\n", noiselevel=-1) - portage.writemsg("\n", noiselevel=-1) + return (None, None) mylist = mydepgraph.altlist() mydepgraph.break_refs(mylist) - return mylist + mydepgraph.break_refs(dropped_tasks) + return (mylist, dropped_tasks) def _poll_child_processes(self): """