[GRASS-dev] Re: [GRASS-SVN] r49124 - grass/branches/develbranch_6/lib/init

Hamish hamish_b at yahoo.com
Tue Nov 8 22:37:18 EST 2011


Hamish committed:
> > -  GRASS_ADDON_PATH="$HOME/.grass6/addons/bin:$HOME/.grass6/addons/scripts"
> > +    GRASS_ADDON_PATH="$HOME/.grass6/addons"

Martin wrote:
> I *really* do not understand this change! It goes completely
> against your opinion [1]!
...
> [1] http://lists.osgeo.org/pipermail/grass-user/2011-October/062195.html


don't worry, the ideas are not in conflict at all--
 - bin/ and script/ do not really belong in GRASS_ADDON_PATH,
   because GRASS_ADDON_PATH was not meant to be GRASS_ADDON_BASE.

 - g.extension.sh symlinks executables back into the main
   GRASS_ADDON_PATH from those two subdirs, and as mentioned
   a couple times already I plan to have g.extension.sh move
   them there and drop the bin/ and script/ dirs and symlinking.
   $GRASS_ADDON_PATH goes into the $PATH, so is the place for
   executables.
   the symlink part of the process seems to have failed for you.

> Moreover it causes
> 
> $ echo $GRASS_ADDON_PATH
> /home/martin/.grass6/addons
> 
> $ ls ~/.grass6/addons/scripts/
> i.atcorr.zodh.py
> 
> $ i.atcorr.zodh.py
> bash: i.atcorr.zodh.py: command not found


apparently the symlink back to GRASS_ADDON_PATH did not get made
for the python script?

near the end of g.extension.sh:
   if [ "$MYINST_DIR" = "$GRASS_ADDON_PATH1" ] ; then
      # symlink into path which is actually in the $PATH
      ln -s "$MYINST_DIR/$PROGTYPE/$MODULE" "$MYINST_DIR/"
   fi

but for the case where $GRASS_ADDON_PATH did not already exist,
$MYINST_DIR is "$GRASS_ADDON_PATH" while "$GRASS_ADDON_PATH1"
is probably like "~/.grass6/addons".

probably not hard to fix with a little "set -x", but installing
to the main ADDON_PATH instead of bin/ and script/ (from .tmp/)
will fix it too and is my preferred solution as it simplifies
the situation.


regards,
Hamish


More information about the grass-dev mailing list