[FGS] FGS Self-Installer & Dashes

Alexander Dorsk adorsk at whoi.edu
Tue Jun 24 16:44:03 EDT 2008

Hi All,

= The short =

Packages that have dash characters (-) in their versions seem to cause
self-installers to break.

The cause seems to be in the /etc/fgs/lib/install.sh script of an installed fgs
environment, in the line below:

  ( cd $FILES_SRC ; ls -1 fgs-$MODULE_NAME-*-$FGS_PLATFORM.tar.gz 2>/dev/\
null | tail -n 1 | cut -d '-' -f4 )

Hopefully this will save other folks from source code spelunking.

= The long =

I recently downloaded fgs-dev and tried to build a self-installer which included
ka-map and ImageMagick.  The default version strings for ka-map and ImagMagick
were, respectively: "1.0-20070205" and "6.2.5-3" (note the dashes).

When I later tried to include these modules in a self-installer I got an error
like this: "Unable to find module for <MODULE_NAME> in /tmp/fgs-goobledgop".

The module .tar files were in the tmp tar file created by the self-installer,
but they were not being found by the installer script.

It turned out that the dash in the version number was running into problems with
this line in the 'get_last_module_version' function in /etc/fgs/lib/install.sh:

( cd $FILES_SRC ; ls -1 fgs-$MODULE_NAME-*-$FGS_PLATFORM.tar.gz 2>/dev/\
null | tail -n 1 | cut -d '-' -f4 )

The extra dash in the version string seems to throw off the 'cut' command, which
is cutting on dashes.

When I found this, naturally I said "Dash it all!".   Actually, what I said was
more like @!!$%!@$#!@$#.

I took the lazy man's fix and manually changed the version names of modules in
the build.list file (and their associated .tar.gz files).  That seemed to fix
the problem.  But it may be something to look into for future versions...

Just wanted to pass the word.  I do love the fgs environment and appreciate all
the hard work that you fgs'ers do for it.


This message was sent using IMP, the Internet Messaging Program.

More information about the Foss-gis-suite mailing list