Before, the tool arguments were written to the log as plain strings. Now
the arguments are properly quoted, which makes it possible to replay the
commands by copying them from the .work.log file.
This only affects tools that are shell builtins (echo, true, false), get
additional arguments (mkdir -p) or define a custom TOOLS_SCRIPT
(pkg-config, to set an environment variable; or autotools). Tools that
are symlinked to the real tool are not affected.
The calls to the compiler are already properly logged since cwrappers
takes care of that. This commit therefore makes the log entries for the
compilers and the other tools more similar.
When a package or the infrastructure defined a tool with custom
TOOLS_ARGS or TOOLS_SCRIPT containing special characters, these could
lead to unintuitive interactions at the time when that tool invocation
was logged in the tool wrapper log. Some of the logging output ended up
on stdout, while some of the normal output ended up in the log, and parts
of the quoted arguments were even evaluated as shell commands.
The logging of the wrapped tool commands is not perfect yet, but at least
it's much more predictable now.
The test has been changed again to fail since making the test pass would
mean this bug could later silently show up inside a large GNU configure
script where it would be impossible to find. Therefore, when using pkgsrc
on NetBSD 7, it is better to switch to another shell for doing pkgsrc
work.
The comment has been updated to be more accurate.
many different implementations and are by no way easy to use. This test
collects some assumptions about what the tools must be able to handle.
It is also meant as a guide on using these tools correctly and reliably.