scripts/functions: do not abort on failed svn
author"Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Tue May 31 00:57:36 2011 +0200 (2011-05-31)
changeset 2494feee36c11ccc
parent 2493 b0eac0056942
child 2495 98b02f85db29
scripts/functions: do not abort on failed svn

In case of eglibc, some add-ons that were previously external are
now internal (bundled with the main sources).

So we do not want to fail if an add-on can't be downloaded; we
want to post-pone the check until we can extract the main archive.

So:
- try to retrieve the add-on
- if it fails, print a warning 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 retrieval procedure! :-)

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
scripts/functions
     1.1 --- a/scripts/functions	Mon May 30 23:24:45 2011 +0200
     1.2 +++ b/scripts/functions	Tue May 31 00:57:36 2011 +0200
     1.3 @@ -636,7 +636,10 @@
     1.4      CT_MktempDir tmp_dir
     1.5      CT_Pushd "${tmp_dir}"
     1.6  
     1.7 -    CT_DoExecLog ALL svn export ${rev:+-r ${rev}} "${uri}" "${basename}"
     1.8 +    if ! CT_DoExecLog ALL svn export ${rev:+-r ${rev}} "${uri}" "${basename}"; then
     1.9 +        CT_DoLog WARN "Could not retrieve '${basename}'"
    1.10 +        return 1
    1.11 +    fi
    1.12      CT_DoExecLog ALL tar cjf "${CT_TARBALLS_DIR}/${basename}.tar.bz2" "${basename}"
    1.13      CT_SaveLocal "${CT_TARBALLS_DIR}/${basename}.tar.bz2"
    1.14