logs: Postpone log dir mutable setup until a log is to be generated.

Authored by mpyne on Aug 15 2018, 10:25 PM.

Description

logs: Postpone log dir mutable setup until a log is to be generated.

The logfiles generated for each module are stored in a log directory (again for
each module). The converse is also supposed to apply, a log directory should
only exist for a module if it has logs.

kdesrc-build enforced this in the past by taking extreme care not to call
"getLogDir" unless needed. At some point I missed that nuance and used that
call elsewhere, even when no log was to be generated.

This had the effect of creating a new log directory for the module that had its
log directory looked up, but without ever adding logs to it. kdesrc-build would
also move the latest symlink to point to this empty directory, and then later
remove the directory containing the actual set of latest logs during cleanup.

Even worse, this would happen for every module (since we forced a call to
"getLogDir" so that later code in new async processes would all resolve to the
same log directory)

I fix this by splitting up the "getLogDir" functionality into a read-only part
(creates the base log directory but not the module log directory and does not
move latest symlinks), and a read-write part for log_command.

Details

Committed
mpyneAug 15 2018, 10:25 PM
Parents
R365:b0a2d048bd3b: Show a message post-build if there were compile warnings.
Branches
Unknown
Tags
Unknown