aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/tinderbox/__init__.py17
1 files changed, 14 insertions, 3 deletions
diff --git a/src/tinderbox/__init__.py b/src/tinderbox/__init__.py
index d52c0ce..c9cb79f 100644
--- a/src/tinderbox/__init__.py
+++ b/src/tinderbox/__init__.py
@@ -173,7 +173,7 @@ class Tinderbox(object):
settings = self.settings
for group in dep_groups:
- dep_failed = False
+ dep_failed = None
deps_processed = []
for dep in group:
@@ -203,8 +203,8 @@ class Tinderbox(object):
except Exception, e:
log.error(format_exc())
log.error("Unable to merge dependency %s for package %s" % (dep, pkg))
- dep_failed = True
- break
+ dep_failed = dep[1]
+
deps_processed.append(dep)
settings.setcpv(dep[1], mydb=portdb)
@@ -226,6 +226,10 @@ class Tinderbox(object):
else:
dep_ver_full = "%s-%s" % (dep_ver, dep_rev)
dep_pkg = Package(dep_name, dep_ver_full, real_use_enabled)
+ if dep_failed == dep[1]:
+ build_dir = self.get_build_dir(dep_failed)
+ self._add_attachment(dep_pkg, "%s/temp/build.log" % build_dir)
+ self._add_attachment(dep_pkg, "%s/temp/environment" % build_dir)
package_infos.append(dep_pkg.get_info())
@@ -233,6 +237,7 @@ class Tinderbox(object):
log.error("Unable to emerge package %s with deps %s" % (pkg, group))
# TODO unmerge succeeded deps
self._add_attachment(package, "/var/log/emerge.log")
+ self._add_attachment(package, "%s/tinderbox.log" % config.CHROOT_LOGS)
package.depends = [x[1] for x in group]
continue
settings.setcpv(pkg, mydb=portdb)
@@ -409,6 +414,12 @@ class Tinderbox(object):
result.append(group)
return result
+ def get_build_dir(self, cpv):
+ settings = self.settings
+ bldprefix = settings["PORTAGE_TMPDIR"]+"/portage"
+ return os.path.join(bldprefix, cpv)
+
+
class Package(object):