Package: gmt-examples
Version: 4.1.2-1.1
Hello,
As the subject says, the examples simply won't run. there are 3 problems
as I will show.
problem 1: command not found :
echo $PATH
/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/games
cd /usr/share/doc/gmt-examples
tar cf - examples | ( cd /tmp && tar xf - )
cd /tmp/examples
./do_examples.sh
Doing example 01...cp: cannot stat `../.gmtdefaults4.doc': No such file or
directory
job01.sh: line 9: gmtset: command not found
job01.sh: line 10: psbasemap: command not found
job01.sh: line 11: pscoast: command not found
job01.sh: line 12: grdcontour: command not found
job01.sh: line 13: grdcontour: command not found
job01.sh: line 14: pscoast: command not found
job01.sh: line 15: grdcontour: command not found
job01.sh: line 16: grdcontour: command not found
.....
job25.sh: line 20: grd2xyz: command not found
job25.sh: line 21: gmtmath: command not found
job25.sh: line 22: grdmath: command not found
job25.sh: line 23: grd2xyz: command not found
job25.sh: line 24: gmtmath: command not found
job25.sh: line 32: gmtset: command not found
job25.sh: line 33: grdimage: command not found
job25.sh: line 34: pscoast: command not found
job25.sh: line 36: pslegend: command not found
done
Completed all examples
This is probably related to bug #372635
If a user find where the binary lies and fix his/her PATH, then
there are 2 other problems :
PATH=${PATH}:/usr/lib/gmt/bin
./do_examples.sh
Doing example 01...cp: cannot stat `../.gmtdefaults4.doc': No such file or
directory
grdcontour: No such file or directory [osu91a1f_16.grd]
grdcontour: No such file or directory [osu91a1f_16.grd]
grdcontour: No such file or directory [osu91a1f_16.grd]
grdcontour: No such file or directory [osu91a1f_16.grd]
done
Doing example 02...cp: cannot stat `../.gmtdefaults4.doc': No such file or
directory
problem 2 : missing .gmtdefaults.doc template file
This relatively minor problem if user already has
a $HOME/.gmtdefaults4, a bigger one if not, and a
very big one if user has an old $HOME/.gmtdefaults
but no $HOME/.gmtdefaults4 yet. in the latter case,
user gets hundreds (547 exactly) errors like the
following :
gmtset: WARNING: DEGREE_FORMAT decoded (0) but is obsolete. Please use
PLOT_DEGREE_FORMAT (+ddd:mm:ss)
grdcontour: WARNING: DEGREE_FORMAT decoded (0) but is obsolete. Please use
PLOT_DEGREE_FORMAT (+ddd:mm:ss)
GMT Warning: Selected character encoding does not have suitable degree symbol -
will use space instead
GMT Warning: Selected character encoding does not have minute symbol (single
quote) - will use space instead
GMT Warning: Selected character encoding does not have second symbol (double
quote) - will use space instead
problem 3 : all data files are gzipped
User has now to run
find . -name '*gz' -exec gunzip {} ';'
or some similar horror, before being able to run the do_examples.sh
script.
IMHO, since gmt-examples is a separate package, data files could
be ready to use. another solution is to modify the do_examples.*h
so that either the user is warned or the files are uncompressed
on the fly. This is an idea for do_examples.sh :
case "$0" in
/*) here=${0%/*} ;;
*) here=`pwd`/$0 ; here=${here%/*} ;;
esac
( cd "$here" && find . -name '*.gz' -exec gunzip {} ';' )
Christophe.
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]