summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorYann E. MORIN" <yann.morin.1998@anciens.enib.fr>2011-05-30 21:24:45 (GMT)
committerYann E. MORIN" <yann.morin.1998@anciens.enib.fr>2011-05-30 21:24:45 (GMT)
commit1c3c90d0d4cfcba7c144b149210e9d914f9244d6 (patch)
treeb0c7ba77999288a5393c065882ed9b4d976bdaa9 /scripts
parent0c733700231da13aa12f7e0c26bee356f5bd846e (diff)
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" <yann.morin.1998@anciens.enib.fr>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/functions7
1 files changed, 5 insertions, 2 deletions
diff --git a/scripts/functions b/scripts/functions
index f944eac..9fc7b73 100644
--- a/scripts/functions
+++ b/scripts/functions
@@ -700,7 +700,8 @@ CT_Extract() {
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 @@ CT_Extract() {
.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