summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2008-08-14 20:28:33 +0000
committerZac Medico <zmedico@gentoo.org>2008-08-14 20:28:33 +0000
commitef917ae144197e5097a5b3e4faadddaa604d05d2 (patch)
treeb29c7932d76c4d96abfeb9cd08e6882acc4ff733
parent6ce970a6a2462fcc07d4b0b2551ffa0c7dd9b338 (diff)
downloadportage-ef917ae144197e5097a5b3e4faadddaa604d05d2.tar.gz
portage-ef917ae144197e5097a5b3e4faadddaa604d05d2.tar.bz2
portage-ef917ae144197e5097a5b3e4faadddaa604d05d2.zip
When a build fails, generate a status message showing which package
failed and the path of the relevant log file if available. Thanks to _neuron_ for the suggestion. Here is some sample output: >>> Emerging (1 of 1) foo-bar/baz-1.0 >>> Failed to emerge foo-bar/baz-1.0, Log file: >>> '/var/log/portage/foo-bar:baz-1.0:20080814-202327.log' svn path=/main/trunk/; revision=11411
-rw-r--r--pym/_emerge/__init__.py64
1 files changed, 46 insertions, 18 deletions
diff --git a/pym/_emerge/__init__.py b/pym/_emerge/__init__.py
index 9bc06db22..a900dbb61 100644
--- a/pym/_emerge/__init__.py
+++ b/pym/_emerge/__init__.py
@@ -9428,27 +9428,12 @@ class Scheduler(PollScheduler):
log_paths = [failed_pkg.build_log]
- if not (build_dir and os.path.isdir(build_dir)):
- log_paths.append(failed_pkg.fetch_log)
-
- for log_path in log_paths:
- if not log_path:
- continue
-
- try:
- log_size = os.stat(log_path).st_size
- except OSError:
- continue
-
- if log_size == 0:
- continue
-
+ log_path = self._locate_failure_log(failed_pkg)
+ if log_path is not None:
try:
log_file = open(log_path, 'rb')
except IOError:
- continue
-
- break
+ pass
if log_file is not None:
try:
@@ -9505,6 +9490,32 @@ class Scheduler(PollScheduler):
self._failed_pkgs_die_msgs.append(
(mysettings, key, errors))