From 92898249bd1eb4c6bc0ab28bd78793464eaa1f9b Mon Sep 17 00:00:00 2001 From: Anthony Foiani Date: Fri, 22 Oct 2010 22:02:57 +0200 Subject: scripts: add "FILE" and "CFG" debug levels. I ran into some minor difficulties looking through the build log for a particular file: I wasn't interested in seeing it unpacked, but only when it is built or installed. Adding these two levels allows me to differentiate between those cases. [Yann E. MORIN: Those are blind log levels, and are used only to search in the build-log afterward.] Signed-off-by: Anthony Foiani --- scripts/functions | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'scripts/functions') diff --git a/scripts/functions b/scripts/functions index a5e124c7..c000fc7e 100644 --- a/scripts/functions +++ b/scripts/functions @@ -49,8 +49,10 @@ CT_LOG_LEVEL_ERROR=0 CT_LOG_LEVEL_WARN=1 CT_LOG_LEVEL_INFO=2 CT_LOG_LEVEL_EXTRA=3 -CT_LOG_LEVEL_ALL=4 -CT_LOG_LEVEL_DEBUG=5 +CT_LOG_LEVEL_CFG=4 +CT_LOG_LEVEL_FILE=5 +CT_LOG_LEVEL_ALL=6 +CT_LOG_LEVEL_DEBUG=7 # Make it easy to use \n and ! CR=$(printf "\n") @@ -63,6 +65,8 @@ BANG='!' # - INFO: Informational messages # - EXTRA: Extra informational messages # - DEBUG: Debug messages +# - CFG: Output of various "./configure"-type scripts +# - FILE: File / archive unpacking. # - ALL: Component's build messages # Usage: CT_DoLog [message] # If message is empty, then stdin will be logged. @@ -671,9 +675,9 @@ CT_Extract() { CT_DoLog EXTRA "Extracting '${basename}'" case "${ext}" in - .tar.bz2) CT_DoExecLog ALL tar xvjf "${full_file}";; - .tar.gz|.tgz) CT_DoExecLog ALL tar xvzf "${full_file}";; - .tar) CT_DoExecLog ALL tar xvf "${full_file}";; + .tar.bz2) CT_DoExecLog FILE tar xvjf "${full_file}";; + .tar.gz|.tgz) CT_DoExecLog FILE tar xvzf "${full_file}";; + .tar) CT_DoExecLog FILE tar xvf "${full_file}";; /.git) CT_ExtractGit "${basename}" "${@}";; *) CT_Abort "Don't know how to handle '${basename}${ext}': unknown extension";; esac @@ -729,7 +733,7 @@ CT_ExtractGit() { case "${ref_type}" in none) ;; - *) CT_DoExecLog ALL git checkout "${ref}";; + *) CT_DoExecLog FILE git checkout "${ref}";; esac CT_Popd -- cgit v1.2.3