Mercurial > hg > aboriginal
changeset 1487:7ab15346cbf6
Document target /usr/sbin/record-commands wrapper.
author | Rob Landley <rob@landley.net> |
---|---|
date | Wed, 11 Jan 2012 05:59:31 -0600 |
parents | d398569effd2 |
children | 17171917b781 |
files | sources/root-filesystem/sbin/record-commands www/FAQ.html |
diffstat | 2 files changed, 9 insertions(+), 17 deletions(-) [+] |
line wrap: on
line diff
--- a/sources/root-filesystem/sbin/record-commands Mon Jan 09 21:03:28 2012 -0600 +++ b/sources/root-filesystem/sbin/record-commands Wed Jan 11 05:59:31 2012 -0600 @@ -9,6 +9,7 @@ if [ $# -eq 0 ] then echo "Usage: record-commands command..." + echo "Then examine $WRAPPY_LOGPATH" exit 1 fi
--- a/www/FAQ.html Mon Jan 09 21:03:28 2012 -0600 +++ b/www/FAQ.html Wed Jan 11 05:59:31 2012 -0600 @@ -276,9 +276,11 @@ <h3><b>Use the command logging wrapper</b></h3> <p>If you need more logging detail, run more/record-commands.sh, then re-run -the build and look at the output in build/logs.</p> +the build and look at the output in build/logs. (A similar "record-commands" +wrapper is available in each system image's /usr/sbin directory, to +log the commands of native builds.)</p> -<p>The record-commands script sets up a wrapper which logs every command (and +<p>more/record-commands.sh sets up a wrapper which logs every command (and all its arguments) run out of $PATH. It populates build/wrapdir with symlinks for every command name currently in $PATH, all pointing to the "wrappy" binary (built from sources/toys/wrappy.c). If you run record-commands @@ -296,21 +298,10 @@ to a run without host-tools can be instructive; that's the extra stuff ./configure is picking up out of the host environment.)</p> -<p>If you'd like to use the command recording wrapper in another context -(such as on the target system), do this:<p> - -<blockquote><pre> -[copy sources/toys/wrappy.c to the target] -mkdir /home/wrappy -gcc wrappy.c -o /home/wrappy/wrappy -for i in $(cd /bin; ls); do ln -s wrappy /home/wrappy/$i; done -for i in $(cd /sbin; ls); do ln -s wrappy /home/wrappy/$i; done -export WRAPPY_LOGPATH=/home/wrap.log -export OLDPATH="$PATH" - -PATH=/home/wrappy ./runmybuild.sh -</pre> -</blockquote> +<p>The record-commands wrapper is also available in the target root +filesystem's /usr/sbin directory. Run "record-commands /path/to/script" +and when it exits /tmp/record-commands-log.txt should list all the +command lines run by the script, in order.</p> <hr /><a name=debug_test /><h2>Q: How do I run my own build snippets without editing the build scripts?</p></h2>