summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2008-06-27 20:58:40 +0000
committerZac Medico <zmedico@gentoo.org>2008-06-27 20:58:40 +0000
commit574e96418dcfb2eb7e1016058bb329af0ae6d8bc (patch)
tree4644a1e67ebc0cd9e2f6957c3c0162c9f1357b76
parent114085e4fa6f702ea251fb3aae6335801e698f79 (diff)
downloadportage-574e96418dcfb2eb7e1016058bb329af0ae6d8bc.tar.gz
portage-574e96418dcfb2eb7e1016058bb329af0ae6d8bc.tar.bz2
portage-574e96418dcfb2eb7e1016058bb329af0ae6d8bc.zip
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
-rw-r--r--pym/_emerge/__init__.py44
1 files changed, 31 insertions, 13 deletions
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):
"""