\fBFEATURES\fR in order to avoid warning messages that are triggered by this
incompatibility.
.TP
+split\-elog
+Store logs created by \fBPORTAGE_ELOG_SYSTEM="save"\fR in category
+subdirectories of \fBPORT_LOGDIR/elog\fR, instead of using
+\fBPORT_LOGDIR/elog\fR directly.
+.TP
+.B split\-log
+Store build logs in category subdirectories of \fBPORT_LOGDIR/build\fR,
+instead of using \fBPORT_LOGDIR\fR directly.
+.TP
.B splitdebug
Prior to stripping ELF etdyn and etexec files, the debugging info is
stored for later use by various debuggers. This feature is disabled by
logid_time = _unicode_decode(time.strftime("%Y%m%d-%H%M%S",
time.gmtime(os.stat(logid_path).st_mtime)),
encoding=_encodings['content'], errors='replace')
- mysettings["PORTAGE_LOG_FILE"] = os.path.join(
- mysettings["PORT_LOGDIR"], "%s:%s:%s.log" % \
- (mysettings["CATEGORY"], mysettings["PF"], logid_time))
- del logid_path, logid_time
+
+ if "split-log" in mysettings.features:
+ mysettings["PORTAGE_LOG_FILE"] = os.path.join(
+ mysettings["PORT_LOGDIR"], "build", "%s/%s:%s.log" % \
+ (mysettings["CATEGORY"], mysettings["PF"], logid_time))
+ else:
+ mysettings["PORTAGE_LOG_FILE"] = os.path.join(
+ mysettings["PORT_LOGDIR"], "%s:%s:%s.log" % \
+ (mysettings["CATEGORY"], mysettings["PF"], logid_time))
+
+ util.ensure_dirs(os.path.dirname(mysettings["PORTAGE_LOG_FILE"]))
+
else:
# NOTE: When sesandbox is enabled, the local SELinux security policies
# may not allow output to be piped out of the sesandbox domain. The
elogdir = os.path.join(os.sep, "var", "log", "portage", "elog")
ensure_dirs(elogdir, uid=portage_uid, gid=portage_gid, mode=0o2770)
- elogfilename = os.path.join(elogdir, path + ":" + _unicode_decode(
+ cat = mysettings['CATEGORY']
+ pf = mysettings['PF']
+
+ elogfilename = pf + ":" + _unicode_decode(
time.strftime("%Y%m%d-%H%M%S", time.gmtime(time.time())),
- encoding=_encodings['content'], errors='replace') + ".log")
+ encoding=_encodings['content'], errors='replace') + ".log"
+
+ if "split-elog" in mysettings.features:
+ elogfilename = os.path.join(elogdir, cat, elogfilename)
+ else:
+ elogfilename = os.path.join(elogdir, cat + ':' + elogfilename)
+ ensure_dirs(os.path.dirname(elogfilename),
+ uid=portage_uid, gid=portage_gid, mode=0o2770)
+
elogfile = codecs.open(_unicode_encode(elogfilename,
encoding=_encodings['fs'], errors='strict'),
mode='w', encoding=_encodings['content'], errors='backslashreplace')