hpcugent/easybuild-framework — pull request #943 by boegel (2014-06-05 20:42:34+00:00)
Title: stop fiddling with order of $MODULEPATH entries, reset Lmod state before using it

There's no (very good) reason to filter out duplicate entries or effectively move the EasyBuild modules path to the front of `$MODULEPATH` rather than just prepending to it.

It does cause problems with Lmod 5.6.x however, which checks for "unexpected changes" in `$MODULEPATH` to make sure its internal bookkeeping is kept in sync/correct.

`$MODULEPATH` is still being changed significantly in several other places in EasyBuild, which is not digested well by Lmod 5.6.x, so we run `lmod python --initial_load list` first before using Lmod in a next context (i.e. with a freshly defined `$MODULEPATH`).

@rtmclay: Can you take a look at this? Is using `--initial_load` the right way to reset Lmod's state (such that it ignores any previous values that `$MODULEPATH` had before)?