On 2009-Aug-02 12:24:26 -0700, William Stein <wst...@gmail.com> wrote:
>> 1) It uses 'set -e' to exit the spkg-install if any error occurs.
>
>+1 we should do that for all spkg-install's

Agreed (and there are other shell-scripts that probably should also
have 'set -e').  But this is a very intrusive change since it touches
at least one file in virtually every spkg.

It's also non-trivial:  The spkg-install files are full of constructs
like:
  sage_fortran -c -fPIC *.f
  if [ $? -ne 0 ]; then
    echo "Error compiling blas."
    exit 1
  fi
In order to add 'set -e', this needs to be changed to directly test the
exit code rather than using $? - otherwise the script will immediately
exit when the command fails.  The revised code should look like:
  if ! sage_fortran -c -fPIC *.f; then
    echo "Error compiling blas."
    exit 1
  fi

In addition to the above, there is a non-trivial amount of shell code
embedded in python scripts that also needs improved error checking.

Assuming that the change should be implemented, what approach should
be used:
1) Big bang: Someone goes through all the skpg files and fixes them
   in one go with no other changes as part of a major release.
2) If you touch any part of an spkg, you must add 'set -e' and fixup
   any subsequent fallout in all scripts in that spkg.
3) If you touch a script, you must fixup that script.
4) Fix it if you feel like it.

-- 
Peter Jeremy

Attachment: pgpDJ0B2CDgXH.pgp
Description: PGP signature

Reply via email to