Commit Graph

637 Commits

Author SHA1 Message Date
gsell d25663a32e modulefile: bugfix in modifying PATH 2021-05-06 09:27:28 +02:00
gsell 9a0d55ed85 modulecmd: save environment after unloading a module 2021-05-06 09:25:26 +02:00
gsell 325551eecd modulecmd: fixes in adding/removing overlays
bugfix in the code to prevent adding an overlay if modules are already
loaded, same for removing

more clear error message if an overlay cannot be added/removed

use constants for overlay modifiers
2021-05-06 09:19:46 +02:00
gsell 415a942931 libmodules.tcl: bugfixes in module-addgroup() handling overlays
replacing(global) overlays were not handle properly
2021-05-06 09:11:44 +02:00
gsell 38bbf3917d Merge branch 'master' into 32-overlay-implementation 2021-04-30 15:58:52 +02:00
gsell b0636eb004 Merge branch '112-modmanage-review-and-cleanup' into 'master'
Resolve "modmanage: review and cleanup"

Closes #112

See merge request Pmodules/src!80
2021-04-30 15:33:32 +02:00
gsell 47bccd5fa8 modmange: functions from libpmodules.bash added 2021-04-30 15:30:17 +02:00
gsell 8c4d911fa5 modmanage: don't use PATH to find commands 2021-04-30 15:27:46 +02:00
gsell 291039084b modmanage: hardcode CMD 2021-04-30 15:24:13 +02:00
gsell 2747861b52 modmanage: shebang fixed 2021-04-30 15:23:44 +02:00
gsell 7146c2b179 Merge branch '111-modulecmd-better-tmp-file-handling' into 'master'
Resolve "modulecmd: better tmp file handling"

Closes #111

See merge request Pmodules/src!79
2021-04-29 19:34:27 +02:00
gsell c55404a798 modulecmd: better tmp file handling
A global tmp file is created if the sub-command is 'load', 'purge' or
'search' and removed in the exit function.
2021-04-29 19:29:42 +02:00
gsell f398834f08 Merge branch '110-don-t-remove-a-pmodules-module-with-module-purge' into 'master'
Resolve "don't remove a Pmodules module with module purge"

Closes #110

See merge request Pmodules/src!78
2021-04-29 18:58:45 +02:00
gsell a970be1cf3 modulecmd: don't remove a loaded Pmodules module with module purge
Removing a Pmodule module with module purge has some unwanted
side-effects. It is not required to have modulecmd in a directory of
PATH. If you user explicitly loads a Pmodules module the bin directory
of the Pmodule module is added to the PATH. A Pmodules module might be
loaded for two reasons. First to change the Pmodules version, second
to make the build system available. If we remove a Pmodules module
with module purge the build systems is getting unavailable again. This
is confusing for the user.
2021-04-29 18:47:01 +02:00
gsell 80728b8a6a modulecmd: tag log messages with 'Pmodules' 2021-04-29 18:10:55 +02:00
gsell 47b5fae59b modbuild: better support for build modules in overlays
A new configuration file has been added to map human readable overlay
names to the corresponding directory. The overlay can be specified
with the --overlay option. The passed string can be either a name or a
directory. If a name is passed, this name must map to directory in the
configuration file ${PMODULES_ROOT}/config/overlays.conf. The name is
also used as to select the variant files 'files/variants.name'. The
selection of variant files can be overriden with the --system
option.
2021-04-29 17:54:25 +02:00
gsell d23fdf930a Pmodule modulefile: remove Pmodules bin dir from PATH
in some cases it might happen that we have a Pmodules bin directory
in PATH. This has to be removed if we load a Pmodule module.
2021-04-28 18:52:58 +02:00
gsell 9e6566636b modulecmd: bugfix in use/unuse overlays 2021-04-28 18:51:29 +02:00
gsell c44f393ef2 modulecmd: improved handling of tmp file(s)
A tmp file is now created at the very beginning for all subcommands
where a tmp file is needed. The file is removed in the _exit()
function which is registered via trap.
2021-04-28 14:21:16 +02:00
gsell 23cbb4210e modulecmd: sub-cmd purge: reset MODUEPATH to used groups
The sub-command purge should not remove used groups from MODULEPATH
2021-04-28 11:49:45 +02:00
gsell 077cf0c4be modulecmd: bugfix in save_env()
Unsetting 'UsedGroups' the way we did doesn't work, revert this change
2021-04-28 11:46:13 +02:00
gsell 4ed8961fc1 modulecmd.bash.in: bug fixed in purge sub-cmd 2021-04-28 10:58:53 +02:00
gsell 1b43ccbe21 modulecmd.bash.in: bugfix in initialization of overlays
the variables required for overlays were not initialized in a proper
way if we switch from a Pmodules version without overlay support
2021-04-28 10:56:00 +02:00
gsell a0420cc73f modulecmd.bash.in: save_env() requires an argument now
PMODULES_ENV will be compiles and exported if save_env() is called
with $1 != 'no'
2021-04-28 10:53:07 +02:00
gsell aa4140631c tcllib added to repo 2021-04-28 10:52:12 +02:00
gsell ad8a02cdcf modulecmd.bash.in: bug fixed in looping over overlays
- the order of overlays is important, we have to use an array instead
  of a dictionary
- PMODULES_OVERLAYS renamed to OverlayList which is now an array and
  exported in PMODULES_ENV
- MapDirsToOverlays renamed to Dir2OverlayMap
- dictionary Overlays renamed to OverlayDict
2021-04-28 01:01:21 +02:00
gsell 624b2757ff modulecmd.bash.in: subcommand_unuse(): cleanup 2021-04-28 00:58:42 +02:00
gsell 1932db23d0 modulecmd.bash.in: sub.._avail(): use variable reference not dict
using a variable reference makes it possible to pass an array to
get_available_modules() insteas a colon separated string
2021-04-28 00:54:29 +02:00
gsell dc52066b7e modulecmd.bash.in: improve readable of module avail 2021-04-28 00:51:40 +02:00
gsell bf030e81b5 modulecmd.bash.in: subcommand_load(): update Dir2OverlayMap
- after loading a module the dictionary mapping a directory to an
  overlay must be updated if a new hierarchical group was added
2021-04-28 00:47:59 +02:00
gsell 0751e9c743 modulecnd.bash.in: find_module(): changes in arguments $3 and $4
- $3 is now the module to load
- $4 is now an array of the splitted MODULEPATH
2021-04-28 00:45:05 +02:00
gsell cc7b4b10cd modulecmd.bash.in: is_group(): upvar with $1 must be declared local 2021-04-28 00:40:41 +02:00
gsell 05aa3d0e42 modulecmd.bash.in: new global function get_overlay_of_moduledir() 2021-04-28 00:37:54 +02:00
gsell 376be20d35 modulecmd.bash.in: reset_modulepath() must be global 2021-04-28 00:35:52 +02:00
gsell f9430563e5 modulecmd.bash.in: cleanup 2021-04-28 00:34:55 +02:00
gsell a75e766cbc modulecmd.bash.in: get_release(): redirect release file to upvar 2021-04-28 00:29:21 +02:00
gsell 3eb1830443 modulecmd.bash.in: save_env(): no need to export UsedGroups 2021-04-28 00:26:42 +02:00
gsell 6674333728 modulecmd.bash.in: call logger via variable with full path 2021-04-28 00:23:31 +02:00
gsell ef1d10aa3d modulecmd.bash.in: unset IFS instead of restoring a default 2021-04-28 00:17:52 +02:00
gsell 0b8059efac libmodules.tcl: refactor some variable names, review
- name of dictionary of overlay renamed from Overlays to OverlayDict
- get list of overlays from PMODULES_ENV (OverlayList),
  PMODULES_OVERLAYS has been removed
2021-04-28 00:05:09 +02:00
gsell 15fb22e4c8 build script: commented out lines to build coreutils removed 2021-04-28 00:02:53 +02:00
gsell 7ddd9b0ed7 modulecmd: bugfix in initializing env. variable needed for overlays.
- if we switch from a Pmodules version without overlay support to a
  Pmodule version with, some environment variables must be initialzed.
2021-04-22 09:51:19 +02:00
gsell b62841239c modulecmd: bugfix in use/unuse overlay
- Since Pmodules itself can be loaded as module, it must be possible
  to add/remove overlays if no modules are loaded or only a Pmodules
  module.
2021-04-22 09:48:27 +02:00
gsell 5661f69169 modulecmd: get_available_modules(): bugfix
- it was expected that all modules are in an overlay. This is wrong. a
  user may add a modulefile directory with module use DIR.
2021-04-22 09:45:39 +02:00
gsell a415cdc136 modulecmd: follow links in find cmd 2021-04-22 09:44:03 +02:00
gsell a53bf42479 modulecmd: use IFS saved as the beginning for restoring 2021-04-22 09:41:06 +02:00
gsell bfc754efa1 tcllib added, version set to 1.1.1 2021-04-22 09:37:56 +02:00
gsell f5aaff5842 libmodules.tcl: some unconditional debug output removed 2021-04-22 09:35:12 +02:00
gsell 4538ac12c3 master merged 2021-04-20 00:32:26 +02:00
gsell 9df3fbe664 Merge branch '109-add-cuda-as-hierarchical-group-to-build-system' into 'master'
Resolve "add CUDA as hierarchical group to build system"

Closes #109

See merge request Pmodules/src!77
2021-04-19 15:55:00 +02:00