# HG changeset patch # User "Yann E. MORIN" # Date 1306790685 -7200 # Node ID b0eac00569428be7cf62378b77ad1d414995d6b0 # Parent b6495ef0193cb2939e2390fce125c797d3ee19ec scripts/functions: do not abort on failed extract For glibc/eglibc, if the add-on can not be extracted, we want to catch the error to print a meaningful error message. So: - try to extract the tarball - if it fails, print a waring instead of calling CT_Abort - return 1 So, components that want to catch the error and want to handle it can, while components that do not will gracefuly fail thanks to our catching every errors. Bonus: it works without changing any existing extract procedure! :-) Signed-off-by: "Yann E. MORIN" diff -r b6495ef0193c -r b0eac0056942 scripts/functions --- a/scripts/functions Mon May 30 23:24:11 2011 +0200 +++ b/scripts/functions Mon May 30 23:24:45 2011 +0200 @@ -700,7 +700,8 @@ shift if ! ext="$(CT_GetFileExtension "${basename}")"; then - CT_Abort "'${basename}' not found in '${CT_TARBALLS_DIR}'" + CT_DoLog WARN "'${basename}' not found in '${CT_TARBALLS_DIR}'" + return 1 fi local full_file="${CT_TARBALLS_DIR}/${basename}${ext}" @@ -728,7 +729,9 @@ .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";; + *) CT_DoLog WARN "Don't know how to handle '${basename}${ext}': unknown extension" + return 1 + ;; esac # Don't mark as being extracted for git