diff --git a/.appveyor.yml b/.appveyor.yml index d4253db82..8c3334fde 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -27,7 +27,8 @@ install: # also install shells and script interpreter for test purpose # no availability of R on MSYS2 platform - if "%BUILD_PLATFORM%" == "msys" (%CMD_DIR%\bash -lc "pacman --noconfirm --noprogressbar -S tcl dejagnu python ruby cmake zsh tcsh mksh fish gcc autoconf") - - if "%BUILD_PLATFORM%" == "cygwin" (%CMD_DIR%\bash -lc "/setup-x86_64.exe -qnNdO -P tcl,dejagnu,ruby,cmake,zsh,tcsh,mksh,fish,R,tcl-devel,gcc-core,autoconf") + # temporarily stop to test against CMake on Cygwin platform (see https://github.com/appveyor/ci/issues/3508) + - if "%BUILD_PLATFORM%" == "cygwin" (%CMD_DIR%\bash -lc "/setup-x86_64.exe -qnNdO -P tcl,dejagnu,ruby,zsh,tcsh,mksh,fish,R,tcl-devel,gcc-core,autoconf") # install Tcl for native test and requirement in Cygwin to build Windows-specific dist zipball - if "%BUILD_PLATFORM%" == "native" (%CMD_DIR%\bash -lc "/setup-x86_64.exe -qnNdO -P tcl,python37,python37-sphinx,zip") - if "%BUILD_PLATFORM%" == "native" ( diff --git a/.travis.yml b/.travis.yml index 3fb790ab4..032fddfba 100644 --- a/.travis.yml +++ b/.travis.yml @@ -142,7 +142,7 @@ jobs: # compatibility version-specific build requirements - automake - autopoint - - env: CONFIGURE_OPTS='--with-tclsh=tclsh8.6 --prefix=/tmp/modules --enable-compat-version --with-tcl=/usr/lib/tcl8.6 --enable-append-manpath --enable-append-binpath --with-bin-search-path=/usr/bin:/bin --disable-silent-shell-debug-support --enable-windows-support --with-loadedmodules=null:dot --with-quarantine-vars=LD_LIBRARY_PATH --enable-color --with-dark-background-colors=hi=1:se=2:er=91:wa=93:mp=1;94:di=94:al=96:sy=95' + - env: CONFIGURE_OPTS='--with-tclsh=tclsh8.6 --prefix /tmp/modules --enable-compat-version --with-tcl=/usr/lib/tcl8.6 --enable-append-manpath --enable-append-binpath --with-bin-search-path=/usr/bin:/bin --disable-silent-shell-debug-support --enable-windows-support --with-loadedmodules=null:dot --with-quarantine-vars=LD_LIBRARY_PATH --enable-color --with-dark-background-colors=hi=1:se=2:er=91:wa=93:mp=1;94:di=94:al=96:sy=95 --enable-foo FOO=bar' EXTRA_SCRIPT_CD='modules-1.2.3+branch_name-91-g6dd3db49' addons: apt: @@ -245,7 +245,7 @@ jobs: # also enable a display on this test case to validate x-resource behavior - env: OS_NAME=centos OS_VERSION=6 DOCKER_IMAGE=${OS_NAME}:${OS_NAME}${OS_VERSION} CONTAINER=${OS_NAME}${OS_VERSION} CMD_PREFIX="docker exec --env RUNTESTFLAGS=-v $CONTAINER xvfb-run" - CONFIGURE_OPTS='--prefix=/tmp/modules --enable-compat-version --with-loadedmodules=null:dot --with-quarantine-vars=LD_LIBRARY_PATH LD_PRELOAD' + CONFIGURE_OPTS='--prefix /tmp/modules --enable-compat-version --with-loadedmodules=null:dot' CONFIGURE_OPTS_EXTRA='--with-quarantine-vars=LD_LIBRARY_PATH LD_PRELOAD' EXTRA_PKGS='xorg-x11-server-utils xorg-x11-server-Xvfb automake gettext-devel libX11-devel tclx-devel' EXTRA_SCRIPT_POSTINST='make srpm rpm' services: @@ -253,7 +253,7 @@ jobs: - env: OS_NAME=centos OS_VERSION=7 DOCKER_IMAGE=${OS_NAME}:${OS_NAME}${OS_VERSION} CONTAINER=${OS_NAME}${OS_VERSION} CMD_PREFIX="docker exec --env RUNTESTFLAGS=-v $CONTAINER xvfb-run" - CONFIGURE_OPTS='--prefix=/tmp/modules --enable-compat-version --with-loadedmodules=null:dot --with-quarantine-vars=LD_LIBRARY_PATH LD_PRELOAD' + CONFIGURE_OPTS='--prefix=/tmp/modules --enable-compat-version --with-loadedmodules=null:dot' CONFIGURE_OPTS_EXTRA='--with-quarantine-vars=LD_LIBRARY_PATH LD_PRELOAD' EXTRA_PKGS='which xorg-x11-server-utils xorg-x11-server-Xvfb automake gettext-devel libX11-devel tclx-devel' EXTRA_SCRIPT_POSTINST='make srpm rpm' services: @@ -261,7 +261,7 @@ jobs: - env: OS_NAME=centos OS_VERSION=8 DOCKER_IMAGE=${OS_NAME}:${OS_NAME}${OS_VERSION} CONTAINER=${OS_NAME}${OS_VERSION} CMD_PREFIX="docker exec --env RUNTESTFLAGS=-v $CONTAINER xvfb-run" - CONFIGURE_OPTS='--prefix=/tmp/modules --enable-compat-version --with-loadedmodules=null:dot --with-quarantine-vars=LD_LIBRARY_PATH LD_PRELOAD' + CONFIGURE_OPTS='--prefix=/tmp/modules --enable-compat-version --with-loadedmodules=null:dot' CONFIGURE_OPTS_EXTRA='--with-quarantine-vars=LD_LIBRARY_PATH LD_PRELOAD' EXTRA_PKGS='which xorg-x11-server-utils xorg-x11-server-Xvfb automake gettext-devel libX11-devel' EXTRA_SCRIPT_POSTINST='make srpm rpm' services: @@ -277,7 +277,7 @@ jobs: # also enable a display on this test case to validate x-resource behavior - env: OS_NAME=opensuse OS_VERSION=leap DOCKER_IMAGE=${OS_NAME}/${OS_VERSION} CONTAINER=${OS_VERSION} CMD_PREFIX="docker exec --env RUNTESTFLAGS=-v $CONTAINER xvfb-run" - CONFIGURE_OPTS='--prefix=/tmp/modules --enable-compat-version --enable-versioning --with-loadedmodules=null:dot --with-quarantine-vars=LD_LIBRARY_PATH LD_PRELOAD' + CONFIGURE_OPTS='--prefix=/tmp/modules --enable-compat-version --enable-versioning --with-loadedmodules=null:dot' CONFIGURE_OPTS_EXTRA='--with-quarantine-vars=LD_LIBRARY_PATH LD_PRELOAD' EXTRA_PKGS='which xrdb xvfb-run automake gettext-tools' services: - docker @@ -335,7 +335,8 @@ before_script: | fi script: - - $CMD_PREFIX ./configure $CONFIGURE_OPTS + - if [ -z "$CONFIGURE_OPTS_EXTRA" ]; then $CMD_PREFIX ./configure $CONFIGURE_OPTS; fi + - if [ -n "$CONFIGURE_OPTS_EXTRA" ]; then $CMD_PREFIX ./configure $CONFIGURE_OPTS "$CONFIGURE_OPTS_EXTRA"; fi - $CMD_PREFIX make - if [ -n "$EXTRA_SCRIPT_PRETEST" ]; then $CMD_PREFIX eval $EXTRA_SCRIPT_PRETEST; fi - travis_retry $CMD_PREFIX make test-deps diff --git a/NEWS.rst b/NEWS.rst index 2da8453ad..29e753776 100644 --- a/NEWS.rst +++ b/NEWS.rst @@ -6,6 +6,67 @@ Release notes This file describes changes in recent versions of Modules. It primarily documents those changes that are of interest to users and admins. +Modules 4.5.3 (2020-08-31) +-------------------------- + +* Install: take into account the ``--build``, ``--host``, ``--target``, + ``--enable-dependency-tracking`` and ``--disable-dependency-tracking`` + configure options to transmit them to the :file:`configure` scripts of + Modules Tcl extension library and Modules compatibility version. (fix issue + #354) +* Install: ignore some regular options of an Autoconf :file:`configure` script + that are useless for this project but usually implied in build macros (like + RPM ``%configure`` macro). +* Install: ignore unsupported ``--enable-*`` and ``--with-*`` options on + :file:`configure` script rather raise an error and add support to define + environment variable and build system type as :file:`configure` script + arguments to comply with `GNU configuration recommendations`_. +* Install: fix :file:`modulecmd` pre-alternatives check in RPM spec file. +* Install: use ``%make_build`` and ``%make_install`` macros in RPM spec file. +* When :mfcmd:`module switch` command is used in modulefile, do not + state when processing it a conflict over switched-off module if its + specification on the ``module switch`` command also matches switched-on + module's specification. Allow this way the replacement of any loaded version + of a module for a specific one required by currently loading module. (fix + issue #355) +* Correctly report failed attempts to load module requirements expressed with + advanced version specifiers. (fix issue #356) + +.. _GNU configuration recommendations: https://www.gnu.org/prep/standards/html_node/Configuration.html + + +Modules 4.5.2 (2020-07-30) +-------------------------- + +* Init: :subcmd:`list` and :subcmd:`source` sub-commands do not take available + modules as argument in fish completion script. +* Init: fix option list for :subcmd:`search` sub-command in bash completion + script. +* Fix double error counter increase when modulefile evaluation breaks. +* Install: adapt :file:`configure` script to pass to the :file:`configure` + script of Modules compatibility version only a subset of the options it + supports (most commonly used options). +* Install: raise an error when an unknown option is passed to + :file:`configure` script rather silently ignore it. (fix issue #348) +* Install: enable the definition of installation directory options of + :file:`configure` script with the ``--option value`` syntax in addition to + the ``--option=value`` syntax. (fix issue #348) +* Doc: alphabetically sort sub-commands of :mfcmd:`module-info` modulefile Tcl + command in :ref:`modulefile(4)` document. +* Script: clean previously built environment-modules RPMs in :command:`mrel`. +* Clearly separate quarantine variable definition from tclsh binary on + :file:`modulecmd.tcl` evaluated command call in ``_module_raw`` function for + *sh*, *bash*, *ksh* and *zsh* shells. (fix issue #350) +* Doc: clarify in documentation index that Environment Modules should not be + confused with language-specific modules. (contribution from Rob Hurt) +* Adapt conflict detection tests to ensure a module loaded by its full + pathname will not detect itself as a conflict when declaring a reflexive + conflict. (fix issue #352) +* Adapt the :command:`mrel` and :command:`mpub` commands to produce new + Modules release from a *vZ.Y.x* git branch rather than from the repository + main branch. + + Modules 4.5.1 (2020-06-01) -------------------------- diff --git a/configure b/configure index 3407706ea..4f5b90788 100755 --- a/configure +++ b/configure @@ -120,7 +120,12 @@ compatbranch='c-3.2' # print message on stderr then exit echo_error() { - echo -e "ERROR: $1" >&2 + if [ $# -eq 2 ] && [ $2 -eq 1 ]; then + local tryhelp="\n Try \`$progpath --help' for more information" + else + local tryhelp='' + fi + echo -e "ERROR: $1$tryhelp" >&2 exit 1 } @@ -399,29 +404,68 @@ get_package_value() { # parse arguments for arg in "$@"; do + # set argument value defined with "--arg val" form + if [ -n "${nextargisval+x}" ]; then + declare $nextargisval=$arg + unset nextargisval + continue + # set compat and lib argument value defined with "--arg val" form + elif [ -n "${nextargiscompatlibarg+x}" ]; then + compatarglist+="$arg " + libarglist+="$arg " ; + unset nextargiscompatlibarg + continue + # current arg should be skipped + elif [ -n "${nextargisign+x}" ]; then + unset nextargisign + continue + fi + case "$arg" in --prefix=*) prefix="${arg#*=}" ;; + --prefix) + nextargisval=prefix ;; --bindir=*) bindir="${arg#*=}" ;; + --bindir) + nextargisval=bindir ;; --libdir=*) libdir="${arg#*=}" ;; + --libdir) + nextargisval=libdir ;; --libexecdir=*) libexecdir="${arg#*=}" ;; + --libexecdir) + nextargisval=libexecdir ;; --etcdir=*) etcdir="${arg#*=}" ;; + --etcdir) + nextargisval=etcdir ;; --initdir=*) initdir="${arg#*=}" ;; + --initdir) + nextargisval=initdir ;; --datarootdir=*) datarootdir="${arg#*=}" ;; + --datarootdir) + nextargisval=datarootdir ;; --mandir=*) mandir="${arg#*=}" ;; + --mandir) + nextargisval=mandir ;; --docdir=*) docdir="${arg#*=}" ;; + --docdir) + nextargisval=docdir ;; --vimdatadir=*) vimdatadir="${arg#*=}" ;; + --vimdatadir) + nextargisval=vimdatadir ;; --modulefilesdir=*) modulefilesdir="${arg#*=}" ;; + --modulefilesdir) + nextargisval=modulefilesdir ;; --enable-set-manpath*|--disable-set-manpath) setmanpath=$(get_feature_value "$arg") ;; --enable-append-manpath*|--disable-append-manpath) @@ -558,8 +602,54 @@ for arg in "$@"; do echo_usage exit 0 ;; - *) + --build|--host|--target) + # pass argument supported by compat version anb lib to their ./configure + # script + compatarglist+="$arg " ; + libarglist+="$arg " ; + # and set next arg should also be send to compat version and lib scripts + nextargiscompatlibarg=y ;; + --build=*|--host=*|--target=*) + # pass argument supported by compat version anb lib to their ./configure + # script + compatarglist+="$arg " ; + libarglist+="$arg " ;; + --with-tcl-lib=*|--without-tcl-lib|--with-tcl-ver=*|--without-tcl-ver|\ + --with-tclx=*|--without-tclx|--with-tclx-ver=*|--without-tclx-ver|\ + --with-tclx-lib=*|--without-tclx-lib|--with-tclx-inc=*|--without-tclx-inc|\ + --with-x|--without-x|--enable-dependency-tracking*|\ + --disable-dependency-tracking) + # pass argument supported by compat version to its ./configure script compatarglist+="$arg " ;; + --program-prefix|--program-suffix|--program-transform-name|--exec-prefix|\ + --sbindir|--sysconfdir|--datadir|--includedir|--localstatedir|\ + --sharedstatedir|--infodir|--runstatedir|--oldincludedir|--localedir|\ + --htmldir|--dvidir|--pdfdir|--psdir) + # ignore standard configure option and value which has no meaning here + echo_warning "Option \`$arg' ignored" ; + nextargisign=y ;; + --program-prefix=*|--program-suffix=*|--program-transform-name=*|\ + --exec-prefix=*|--sbindir=*|--sysconfdir=*|--datadir=*|--includedir=*|\ + --localstatedir=*|--sharedstatedir=*|--infodir=*|--runstatedir=*|\ + --oldincludedir=*|--localedir=*|--htmldir=*|--dvidir=*|--pdfdir=*|\ + --psdir=*) + # ignore standard configure option which has no meaning here + echo_warning "Option \`$arg' ignored" ;; + --enable-*|--disable-*|--with-*|--without-*) + # ignore --enable-*/--with-* options not supported here to comply with + # GNU Configuration specification + # (https://www.gnu.org/prep/standards/html_node/Configuration.html) + echo_warning "Option \`$arg' ignored" ;; + -*) + echo_error "Unrecognized option \`$arg'" 1;; + *=*) + echo -e "Export \`$arg' in environment" ; + export $arg ;; + *) + # type of system to build the program for (not needed here but useful + # for true autoconf configure scripts below + compatarglist+="$arg " ; + libarglist+="$arg " ;; esac done @@ -846,6 +936,7 @@ done # configure extension library sources if [ "$libtclenvmodules" = 'y' ]; then echo "--- configuring extension library sources --------" + echo "libarglist = $libarglist" pushd lib ./configure $libarglist || exit 1 popd @@ -855,6 +946,7 @@ fi # configure compat version sources if [ "$compatversion" = 'y' ]; then echo "--- configuring compatibility version sources ----" + echo "compatarglist = $compatarglist" pushd compat # unknown arguments for this configure script are passed down to the # compatibility version configure script (which raise error if arg unknown) diff --git a/contrib/rpm/environment-modules.spec.in b/contrib/rpm/environment-modules.spec.in index 652957602..caae421d7 100644 --- a/contrib/rpm/environment-modules.spec.in +++ b/contrib/rpm/environment-modules.spec.in @@ -2,7 +2,7 @@ %global vimdatadir %{_datadir}/vim/vimfiles Name: environment-modules -Version: 4.5.1 +Version: 4.5.3 Release: @MODULES_RPM_RELEASE@%{?dist} Summary: Provides dynamic modification of a user's environment @@ -105,8 +105,10 @@ This package provides Environment Modules compatibility version (3.2). %endif # configure script for this software is not generated by autoconf -./configure --prefix=%{_datadir}/Modules \ +%configure --prefix=%{_datadir}/Modules \ + --bindir=%{_datadir}/Modules/bin \ --libdir=%{_libdir} \ + --libexecdir=%{_datadir}/Modules/libexec \ --etcdir=%{_sysconfdir}/%{name} \ --mandir=%{_mandir} \ --vimdatadir=%{vimdatadir} \ @@ -117,11 +119,20 @@ This package provides Environment Modules compatibility version (3.2). --with-initconf-in=etcdir \ --with-modulepath=%{_datadir}/Modules/modulefiles:%{_sysconfdir}/modulefiles:%{_datadir}/modulefiles \ --with-quarantine-vars='LD_LIBRARY_PATH LD_PRELOAD' -make %{?_smp_mflags} + +%if 0%{?fedora} >= 22 || 0%{?rhel} >= 7 + %make_build +%else + make %{?_smp_mflags} +%endif %install -make install DESTDIR=%{buildroot} +%if 0%{?fedora} >= 22 || 0%{?rhel} >= 7 + %make_install +%else + make install DESTDIR=%{buildroot} +%endif mkdir -p %{buildroot}%{_sysconfdir}/modulefiles mkdir -p %{buildroot}%{_datadir}/modulefiles @@ -164,7 +175,7 @@ make test # Cleanup from pre-alternatives [ ! -L %{_sysconfdir}/profile.d/modules.sh ] && rm -f %{_sysconfdir}/profile.d/modules.sh [ ! -L %{_sysconfdir}/profile.d/modules.csh ] && rm -f %{_sysconfdir}/profile.d/modules.csh -[ ! -L %{buildroot}%{_bindir}/modulecmd ] && rm -f %{_bindir}/modulecmd +[ ! -L %{_bindir}/modulecmd ] && rm -f %{_bindir}/modulecmd # Migration from version 3.x to 4 if [ "$(readlink /etc/alternatives/modules.sh)" = '%{_datadir}/Modules/init/modules.sh' ]; then @@ -241,6 +252,15 @@ fi %changelog +* Mon Aug 31 2020 Xavier Delaruelle - 4.5.3-1 +- Update to 4.5.3 +- Use 'configure' macro +- Fix modulecmd pre-alternatives cleanup check +- Use 'make_build' and 'make_install' macros + +* Thu Jul 30 2020 Xavier Delaruelle - 4.5.2-1 +- Update to 4.5.2 + * Mon Jun 01 2020 Xavier Delaruelle - 4.5.1-1 - Update to 4.5.1 diff --git a/doc/source/index.rst b/doc/source/index.rst index fbad3ab10..8f82b9b6c 100644 --- a/doc/source/index.rst +++ b/doc/source/index.rst @@ -7,14 +7,14 @@ Environment Modules Modules package provides for the dynamic modification of a user's environment via modulefiles.** -The Modules package is a tool that simplify shell initialization and -lets users easily modify their environment during the session with +The Modules package is a tool that simplifies shell initialization and +lets users easily modify their environment during a session using modulefiles. Each modulefile contains the information needed to configure the shell for an application. Once the Modules package is initialized, the environment -can be modified on a per-module basis using the module command which -interprets modulefiles. Typically modulefiles instruct the module command +can be modified on a per-module basis using the `module` command which +interprets modulefiles. Typically modulefiles instruct the `module` command to alter or set shell environment variables such as ``PATH``, ``MANPATH``, etc. modulefiles may be shared by many users on a system and users may have their own collection to supplement or replace the shared modulefiles. @@ -28,6 +28,10 @@ Modules are useful in managing different versions of applications. Modules can also be bundled into metamodules that will load an entire suite of different applications. +.. note:: Modules presented here are ones that modify the shell or script + execution environment. They should not be confused with language-specific + modules (e.g., Perl modules, Python modules or R modules) that add specific + capabilities to scripts. Quick examples -------------- diff --git a/doc/source/modulefile.rst b/doc/source/modulefile.rst index 48901b38b..a1245319e 100644 --- a/doc/source/modulefile.rst +++ b/doc/source/modulefile.rst @@ -247,20 +247,10 @@ the *modulefile* is being loaded. *option* is the type of information to be provided, and *info-args* are any arguments needed. - **module-info type** - - Returns either ``C`` or ``Tcl`` to indicate which :command:`module` command - is being executed, either the C version or the Tcl-only version, to allow - the *modulefile* writer to handle any differences between the two. - - **module-info mode** [modetype] - - Returns the current :file:`modulecmd.tcl`'s mode as a string if no - *modetype* is given. + **module-info alias** name - Returns ``1`` if :file:`modulecmd.tcl`'s mode is *modetype*. *modetype* can - be: ``load``, ``unload``, ``remove``, ``switch``, ``display``, ``help``, - ``test`` or ``whatis``. + Returns the full *modulefile* name to which the *modulefile* alias *name* + is assigned **module-info command** [commandname] @@ -276,16 +266,33 @@ the *modulefile* is being loaded. .. versionadded:: 4.0 + **module-info loaded** modulefile + + Returns the names of currently loaded modules matching passed *modulefile*. + The parameter *modulefile* might either be a fully qualified *modulefile* + with name and version or just a directory which in case all loaded + *modulefiles* from the directory will be returned. The parameter + *modulefile* may also be a symbolic modulefile name or a modulefile alias. + + .. only:: html + + .. versionadded:: 4.1 + + **module-info mode** [modetype] + + Returns the current :file:`modulecmd.tcl`'s mode as a string if no + *modetype* is given. + + Returns ``1`` if :file:`modulecmd.tcl`'s mode is *modetype*. *modetype* can + be: ``load``, ``unload``, ``remove``, ``switch``, ``display``, ``help``, + ``test`` or ``whatis``. + **module-info name** Return the name of the *modulefile*. This is not the full pathname for *modulefile*. See the `Modules Variables`_ section for information on the full pathname. - **module-info specified** - - Return the name of the *modulefile* specified on the command line. - **module-info shell** [shellname] Return the current shell under which :file:`modulecmd.tcl` was invoked if @@ -311,17 +318,9 @@ the *modulefile* is being loaded. *shelltypename* can be: ``sh``, ``csh``, ``fish``, ``tcl``, ``perl``, ``python``, ``ruby``, ``lisp``, ``cmake``, ``r``. - **module-info alias** name - - Returns the full *modulefile* name to which the *modulefile* alias *name* - is assigned - - **module-info version** modulefile + **module-info specified** - Returns the physical module name and version of the passed symbolic - version *modulefile*. The parameter *modulefile* might either be a full - qualified *modulefile* with name and version, another symbolic *modulefile* - name or a *modulefile* alias. + Return the name of the *modulefile* specified on the command line. **module-info symbols** modulefile @@ -330,17 +329,18 @@ the *modulefile* is being loaded. *modulefile* with name and version, another symbolic *modulefile* name or a *modulefile* alias. - **module-info loaded** modulefile + **module-info type** - Returns the names of currently loaded modules matching passed *modulefile*. - The parameter *modulefile* might either be a fully qualified *modulefile* - with name and version or just a directory which in case all loaded - *modulefiles* from the directory will be returned. The parameter - *modulefile* may also be a symbolic modulefile name or a modulefile alias. + Returns either ``C`` or ``Tcl`` to indicate which :command:`module` command + is being executed, either the C version or the Tcl-only version, to allow + the *modulefile* writer to handle any differences between the two. - .. only:: html + **module-info version** modulefile - .. versionadded:: 4.1 + Returns the physical module name and version of the passed symbolic + version *modulefile*. The parameter *modulefile* might either be a full + qualified *modulefile* with name and version, another symbolic *modulefile* + name or a *modulefile* alias. .. mfcmd:: module-version modulefile version-name... diff --git a/init/bash_completion.in b/init/bash_completion.in index bb171a4df..f898be98c 100644 --- a/init/bash_completion.in +++ b/init/bash_completion.in @@ -151,7 +151,7 @@ _module() { apropos|keyword|search) COMPREPLY=( $(compgen -W "$search_opts" -- "$cur") );; config|--reset) COMPREPLY=( $(compgen -W "$config_opts" -- "$cur") );; - -h|--help|-V|--version|aliases|apropos|keyword|purge|refresh|reload|search|source) + -h|--help|-V|--version|aliases|purge|refresh|reload|source) ;; append-path|prepend-path) COMPREPLY=( $(compgen -W "$path_opts" -- "$cur") );; @@ -226,7 +226,7 @@ if $(type -t ml >/dev/null); then apropos|keyword|search) COMPREPLY=( $(compgen -W "$search_opts" -- "$cur") );; config|--reset) COMPREPLY=( $(compgen -W "$config_opts" -- "$cur") );; - -h|--help|-V|--version|aliases|apropos|keyword|purge|refresh|reload|search|source) + -h|--help|-V|--version|aliases|purge|refresh|reload|source) ;; append-path|prepend-path) COMPREPLY=( $(compgen -W "$path_opts" -- "$cur") );; diff --git a/init/fish_completion b/init/fish_completion index f75409e00..c603a713e 100644 --- a/init/fish_completion +++ b/init/fish_completion @@ -11,7 +11,7 @@ end function __fish_module_use_avail --description 'Test if module command should have available packages as potential completion' for i in (commandline -opc) - if contains -- $i help add load swap switch show display list avail is-loaded is-avail info-loaded source whatis test initadd initprepend path paths + if contains -- $i help add load swap switch show display avail is-loaded is-avail info-loaded whatis test initadd initprepend path paths return 0 end end diff --git a/modulecmd.tcl.in b/modulecmd.tcl.in index 6d3c45632..d728cf0e7 100644 --- a/modulecmd.tcl.in +++ b/modulecmd.tcl.in @@ -1391,12 +1391,13 @@ proc execute-modulefile {modfile modname modspec {must_have_cookie 1}} { } elseif {$errorMsg eq {invoked "break" outside of a loop}\ || ($errorMsg eq {} && (![info exists ::errorInfo]\ || $::errorInfo eq {}))} { - raiseErrorCount unset errorMsg # report load/unload evaluation break if verbosity level >= normal if {([module-info mode load] || [module-info mode unload]) &&\ [isVerbosityLevel normal]} { reportError {Module evaluation aborted} + } else { + raiseErrorCount } return 1 } elseif {$errorCode eq {MODULES_ERR_SUBFAILED}} { @@ -3226,6 +3227,10 @@ proc is-loading {args} { proc conflict {args} { reportDebug $args set currentModule [currentModuleName] + # get module short name if loaded by its full pathname + if {[set isfullpath [isModuleFullPath $currentModule]]} { + set currentSModule [findModuleNameFromModulefile $currentModule] + } defineModEqProc [isIcase] [getConf extended_default] # parse module version specification @@ -3238,6 +3243,7 @@ proc conflict {args} { # if the conflict module is loading and it does not correspond to # currently evaluated module, we cannot proceed set isloading [expr {![doesModuleMatchesName $currentModule $mod] &&\ + (!$isfullpath || ![doesModuleMatchesName $currentSModule $mod]) &&\ [is-loading $mod]}] # if the conflicting module is loaded, we cannot either if {[is-loaded $mod] || $isloading} { @@ -3734,9 +3740,11 @@ proc isModuleEvaluated {context exclmod args} { foreach evalmod [lsearch -all -inline -not [array names\ ::g_moduleEvalAttempt] $exclmod] { set evalmatch 0 - # test arguments against all names of evaluated module - foreach mod [concat [list $evalmod] [getAllModuleResolvedName\ - $evalmod]] { + # test arguments against all names of evaluated module (translate + # eventual modspec in evalmod into module names, in case module + # evaluation stopped prior module name setup) + foreach mod [concat [getAllModulesFromVersSpec $evalmod]\ + [getAllModuleResolvedName $evalmod]] { foreach name $args { if {[modEq $name $mod eqstart]} { set evalmatch 1 @@ -4553,16 +4561,21 @@ proc doesModuleConflict {mod} { set modconlist {} set moddecconlist {} defineModEqProc [isIcase] [getConf extended_default] + # get module short name if loaded by its full pathname + if {[set isfullpath [isModuleFullPath $mod]]} { + set smod [findModuleNameFromModulefile $mod] + } # check if any loaded module has declared a conflict foreach modcon [array names ::g_loadedModuleConflict] { # look if some loaded or loading modules correspond to conflict defined # by mod - if {$modcon eq $mod} { + if {$modcon eq $mod || ($isfullpath && $modcon eq $smod)} { foreach withmod $::g_loadedModuleConflict($modcon) { # skip own reflexive conflict (look at mod main and alternative # names) and those already known - if {![doesModuleMatchesName $mod $withmod] && ([set lmmodlist\ + if {![doesModuleMatchesName $mod $withmod] && (!$isfullpath ||\ + ![doesModuleMatchesName $smod $withmod]) && ([set lmmodlist\ [getLoadedMatchingName $withmod returnall]] ne {} || [set\ lmmodlist [getLoadedMatchingName $withmod returnall 1]] ne {})} { # multiple loaded module may match conflict declared name @@ -4577,7 +4590,8 @@ proc doesModuleConflict {mod} { } elseif {[notInList $modconlist $modcon]} { foreach withmod $::g_loadedModuleConflict($modcon) { # check if mod or one of its alt name match conflict - if {[doesModuleMatchesName $mod $withmod]} { + if {[doesModuleMatchesName $mod $withmod] || ($isfullpath &&\ + [doesModuleMatchesName $smod $withmod])} { lappend modconlist $modcon lappend moddecconlist $modcon set does 1 @@ -5966,7 +5980,7 @@ alias ml 'module ml \!*' ;} @quarantinesupport@ fi; @quarantinesupport@ done; @quarantinesupport@ if [ -n "${_mlre:-}" ]; then} -@quarantinesupport@ append fdef "\n eval `eval \${${wsplit}_mlre}$tclshbin $::argv0\ +@quarantinesupport@ append fdef "\n eval `eval \${${wsplit}_mlre} $tclshbin $::argv0\ @quarantinesupport@$::g_shell '\"\$@\"'`; @quarantinesupport@ else @quarantinesupport@ eval `$tclshbin $::argv0 $::g_shell \"\$@\"`; @@ -9470,11 +9484,16 @@ proc cmdModuleSwitch {uasked old {new {}}} { # mentionned on this module switch command set in a modulefile set orig_auto_handling [getConf auto_handling] if {!$uasked && $argold ne {}} { - # temporarily disable auto handling just to record deps, not to try to - # load or unload them (already tried) - setConf auto_handling 0 - catch {conflict $argold} - setConf auto_handling $orig_auto_handling + # skip conflict declaration if old spec matches new as in this case + # switch means *replace loaded version of mod by this specific version* + lassign [getPathToModule $new] newmodfile newmod + if {$newmod eq {} || ![modEq $argold $newmod eqstart]} { + # temporarily disable auto handling just to record deps, not to try + # to load or unload them (already tried) + setConf auto_handling 0 + catch {conflict $argold} + setConf auto_handling $orig_auto_handling + } } # attempt load and depre reload only if unload succeed diff --git a/script/mpub b/script/mpub index 6c1c99399..b9b2e5d44 100755 --- a/script/mpub +++ b/script/mpub @@ -59,6 +59,14 @@ set cwd [pwd] set logfile mpub.out set logfid [open $logfile w] +# get current branch +set relbranch [exec git branch --show-current] +if {[regexp {^(master|v\d+.\d+.x)$} $relbranch]} { + reportInfo "Found branch '$relbranch'" +} else { + error "git branch '$relbranch' is not a valid release branch" +} + # ensure head sit on a tag set reltag [exec git describe --tags --exact-match] reportInfo "Found release tag '$reltag'" @@ -111,11 +119,11 @@ set distwin modules-$relver-win.zip # --------------------------------------------------------- runcmd 2>@$logfid git push $sfremote c-3.2 -runcmd 2>@$logfid git push $sfremote master +runcmd 2>@$logfid git push $sfremote $relbranch runcmd 2>@$logfid git push $sfremote $reltag runcmd 2>@$logfid git push $ghremote c-3.2 -runcmd 2>@$logfid git push $ghremote master +runcmd 2>@$logfid git push $ghremote $relbranch runcmd 2>@$logfid git push $ghremote $reltag @@ -156,7 +164,7 @@ file delete dlcheck if {[catch {runcmd make distclean} errmsg]} { # skip error if things have already been cleaned up - ignoreexp $errmsg {Makefile:38: *** Makefile.inc is missing, please run\ + ignoreexp $errmsg {Makefile:37: *** Makefile.inc is missing, please run\ './configure'. Stop.} } runcmd 2>@$logfid git checkout gh-pages @@ -180,7 +188,7 @@ close $fid runcmd sftp -o BatchMode=yes -b mpubbatch web.sourceforge.net file delete mpubbatch -runcmd 2>@$logfid git checkout master +runcmd 2>@$logfid git checkout $relbranch # everythings done, clean file transmitted by mrel diff --git a/script/mrel b/script/mrel index 60de598b2..98969bf79 100755 --- a/script/mrel +++ b/script/mrel @@ -82,6 +82,14 @@ set cwd [pwd] set logfile mrel.out set logfid [open $logfile w] +# get current branch +set relbranch [exec git branch --show-current] +if {[regexp {^(master|v\d+.\d+.x)$} $relbranch]} { + reportInfo "Found branch '$relbranch'" +} else { + error "git branch '$relbranch' is not a valid release branch" +} + # ensure head sit on a tag set reltag [exec git describe --tags --exact-match] reportInfo "Found release tag '$reltag'" @@ -130,8 +138,8 @@ if {![info exists env(MREL_GITHUB_TEST_REMOTE)]} { set gh_test_remote $env(MREL_GITHUB_TEST_REMOTE) reportInfo "GitHub test remote set to '$gh_test_remote'" set ghremtgt [lindex [split [exec git remote get-url $gh_test_remote] :.] 2] -set ghstatusurl https://api.github.com/repos/$ghremtgt/commits/master/status -set ghtgturl https://github.com/$ghremtgt/commit/master +set ghstatusurl https://api.github.com/repos/$ghremtgt/commits/$relbranch/status +set ghtgturl https://github.com/$ghremtgt/commit/$relbranch set ghcloneurl https://github.com/$ghremtgt.git set ghexporturl https://github.com/$ghremtgt/archive/$reltag.tar.gz @@ -146,6 +154,10 @@ foreach oldsrpm [glob -nocomplain $srpmdir/environment-modules-*.src.rpm] { reportInfo "Delete previous SRPM '$oldsrpm'" file delete $oldsrpm } +foreach oldrpm [glob -nocomplain $rpmdir/environment-modules-*.rpm] { + reportInfo "Delete previous RPM '$oldrpm'" + file delete $oldrpm +} # remove installed RPMs or dist catch {runcmd 2>@$logfid sudo rpm -e --nodeps scl-utils} @@ -159,7 +171,7 @@ runcmd sudo rm -rf /usr/local/Modules if {[catch {runcmd make distclean} errmsg]} { # skip error if things have already been cleaned up - ignoreexp $errmsg {Makefile:38: *** Makefile.inc is missing, please run\ + ignoreexp $errmsg {Makefile:37: *** Makefile.inc is missing, please run\ './configure'. Stop.} } if {[catch {runcmd ./configure} errmsg]} { @@ -233,7 +245,7 @@ quitorcont # --------------------------------------------------------- runcmd 2>@$logfid git push --force $gh_test_remote c-3.2 -runcmd 2>@$logfid git push --force $gh_test_remote master +runcmd 2>@$logfid git push --force $gh_test_remote $relbranch runcmd 2>@$logfid git push --force $gh_test_remote $reltag # see Phase 7 for CI result check @@ -279,6 +291,7 @@ cd /tmp/mods+test-clone runcmd 2>@$logfid git clone $ghcloneurl cd modules reportInfo "Moved into '[pwd]' directory" +runcmd 2>@$logfid git checkout $relbranch runcmd 2>@$logfid ./configure runcmd make runcmd 2>@$logfid script/mt @@ -348,7 +361,7 @@ while {[array size koji_tasks] > 0} { set koji_out [exec koji taskinfo $ktask] regexp {State: (\w+)} $koji_out match kstate switch -- $kstate { - open { + free - open { reportInfo "Task '$ktask' on '$koji_tasks($ktask)' still\ running" } diff --git a/testsuite/install.00-init/060-quar.exp b/testsuite/install.00-init/060-quar.exp index ed0beed51..8cd3d1269 100644 --- a/testsuite/install.00-init/060-quar.exp +++ b/testsuite/install.00-init/060-quar.exp @@ -29,6 +29,12 @@ if {$install_quarantinevars ne ""} { set ans [list] set ansr [list] +# if test set LD_PRELOAD to a non-existent lib, ld will shout error +if {[lsearch -exact $install_quarlist LD_PRELOAD] != -1} { + lappend ans "(ERROR: ld.so: object 'foo'.*)*" + lappend ansr "(ERROR: ld.so: object 'foo'.*)*" +} + set quar [join $install_quarlist " "] if { $verbose > 0 } { send_user "\tAlready configured MODULES_RUN_QUARANTINE = '$quar'\n" @@ -70,7 +76,7 @@ foreach shell $shell_list { } } default { - testall_cmd "$shell" "module source $modfile" "" [join $ans "\n"] 0 + testall_cmd_re "$shell" "module source $modfile" "" [join $ans "\n"] 0 } } } @@ -81,7 +87,7 @@ foreach shell $othlang_list { testall_cmd_re "$shell" "source,$modfile" "" [join $ansr "\n"] 0 } default { - testall_cmd "$shell" "source,$modfile" "" [join $ans "\n"] 0 + testall_cmd_re "$shell" "source,$modfile" "" [join $ans "\n"] 0 } } } @@ -90,6 +96,10 @@ foreach shell $othlang_list { # Clean up variables used in this test case # +foreach vname $install_quarlist { + unset env($vname) +} + if {[info exists vname]} { unset vname } diff --git a/testsuite/modulefiles.deps/swaa/1.0 b/testsuite/modulefiles.deps/swaa/1.0 new file mode 100644 index 000000000..1c148cdd2 --- /dev/null +++ b/testsuite/modulefiles.deps/swaa/1.0 @@ -0,0 +1 @@ +#%Module diff --git a/testsuite/modulefiles.deps/swaa/1.1 b/testsuite/modulefiles.deps/swaa/1.1 new file mode 100644 index 000000000..1c148cdd2 --- /dev/null +++ b/testsuite/modulefiles.deps/swaa/1.1 @@ -0,0 +1 @@ +#%Module diff --git a/testsuite/modulefiles.deps/swaa/1.2 b/testsuite/modulefiles.deps/swaa/1.2 new file mode 100644 index 000000000..1c148cdd2 --- /dev/null +++ b/testsuite/modulefiles.deps/swaa/1.2 @@ -0,0 +1 @@ +#%Module diff --git a/testsuite/modulefiles.deps/swaa/1.4 b/testsuite/modulefiles.deps/swaa/1.4 new file mode 100644 index 000000000..1c148cdd2 --- /dev/null +++ b/testsuite/modulefiles.deps/swaa/1.4 @@ -0,0 +1 @@ +#%Module diff --git a/testsuite/modulefiles.deps/swaa/2/0 b/testsuite/modulefiles.deps/swaa/2/0 new file mode 100644 index 000000000..1c148cdd2 --- /dev/null +++ b/testsuite/modulefiles.deps/swaa/2/0 @@ -0,0 +1 @@ +#%Module diff --git a/testsuite/modulefiles.deps/swaa/2/2 b/testsuite/modulefiles.deps/swaa/2/2 new file mode 100644 index 000000000..1c148cdd2 --- /dev/null +++ b/testsuite/modulefiles.deps/swaa/2/2 @@ -0,0 +1 @@ +#%Module diff --git a/testsuite/modulefiles.deps/swaa/2/8 b/testsuite/modulefiles.deps/swaa/2/8 new file mode 100644 index 000000000..1c148cdd2 --- /dev/null +++ b/testsuite/modulefiles.deps/swaa/2/8 @@ -0,0 +1 @@ +#%Module diff --git a/testsuite/modulefiles.deps/swaa/3.0 b/testsuite/modulefiles.deps/swaa/3.0 new file mode 100644 index 000000000..1c148cdd2 --- /dev/null +++ b/testsuite/modulefiles.deps/swaa/3.0 @@ -0,0 +1 @@ +#%Module diff --git a/testsuite/modulefiles.deps/swaa/3.2 b/testsuite/modulefiles.deps/swaa/3.2 new file mode 100644 index 000000000..1c148cdd2 --- /dev/null +++ b/testsuite/modulefiles.deps/swaa/3.2 @@ -0,0 +1 @@ +#%Module diff --git a/testsuite/modulefiles.deps/swaa/3.8 b/testsuite/modulefiles.deps/swaa/3.8 new file mode 100644 index 000000000..1c148cdd2 --- /dev/null +++ b/testsuite/modulefiles.deps/swaa/3.8 @@ -0,0 +1 @@ +#%Module diff --git a/testsuite/modulefiles.deps/swab b/testsuite/modulefiles.deps/swab new file mode 100644 index 000000000..f9ded1cfa --- /dev/null +++ b/testsuite/modulefiles.deps/swab @@ -0,0 +1,50 @@ +#%Module + +if {[info exists env(TESTSUITE_SWAA_SWITCH_SET1)]} { + module switch swaa swaa/3.8 +} +if {[info exists env(TESTSUITE_SWAA_SWITCH_SET2)]} { + module switch swaa swaa@3 +} +if {[info exists env(TESTSUITE_SWAA_SWITCH_SET3)]} { + module switch swaa@3 swaa@3.2: +} +if {[info exists env(TESTSUITE_SWAA_SWITCH_SET4)]} { + module switch swaa@1 swaa@3.2: +} +if {[info exists env(TESTSUITE_SWAA_SWITCH_SET5)]} { + module switch swaa/1 swaa@3.2: +} +if {[info exists env(TESTSUITE_SWAA_SWITCH_SET6)]} { + module switch swaa@1 swaa@3.8 +} +if {[info exists env(TESTSUITE_SWAA_SWITCH_SET7)]} { + module switch swaa@1 swaa/3.8 +} +if {[info exists env(TESTSUITE_SWAA_SWITCH_SET8)]} { + module switch swaa@1: swaa@3.8 +} +if {[info exists env(TESTSUITE_SWAA_SWITCH_SET9)]} { + module switch swaa@2 swaa@3 +} +if {[info exists env(TESTSUITE_SWAA_SWITCH_SET10)]} { + module switch swaa/2@:6 swaa@3 +} +if {[info exists env(TESTSUITE_SWAA_SWITCH_SET11)]} { + module switch swaa/2@0,8 swaa/3 +} +if {[info exists env(TESTSUITE_SWAA_SWITCH_SET12)]} { + module switch swaa@1 swaa@2 +} +if {[info exists env(TESTSUITE_SWAA_SWITCH_SET13)]} { + module switch swaa@1 swaa/2@6: +} +if {[info exists env(TESTSUITE_SWAA_SWITCH_SET14)]} { + module switch swaa/2@0,8 swaa +} +if {[info exists env(TESTSUITE_SWAA_SWITCH_SET15)]} { + module switch swaa/2@6: swaa@2 +} +if {[info exists env(TESTSUITE_SWAA_SWITCH_SET16)]} { + module switch swaa/2@6: swaa/2@:6 +} diff --git a/testsuite/modules.50-cmds/370-deps-fullpath.exp b/testsuite/modules.50-cmds/370-deps-fullpath.exp new file mode 100644 index 000000000..10b335c13 --- /dev/null +++ b/testsuite/modules.50-cmds/370-deps-fullpath.exp @@ -0,0 +1,117 @@ +############################################################################## +# Modules Revision 3.0 +# Providing a flexible user environment +# +# File: modules.50-cmds/%M% +# Revision: %I% +# First Edition: 2020/07/29 +# Last Mod.: %U%, %G% +# +# Authors: Xavier Delaruelle, xavier.delaruelle@cea.fr +# +# Description: Testuite testsequence +# Command: load, unload +# Modulefiles: +# Sub-Command: prereq, conflict +# +# Comment: %C{ +# Test resolution of modulefile dependencies when module are +# loaded with their full pathname. +# }C% +# +############################################################################## + +# disable auto_handling with environment variable +setenv_var MODULES_AUTO_HANDLING 0 + +set mp "$modpath.deps" +set mpre "$modpathre.deps" + +# setup specific environment +setenv_path_var MODULEPATH $mp + + +# reflexive conflict +set ans [list] +lappend ans [list setpath LOADEDMODULES $mp/c] +lappend ans [list setpath _LMFILES_ $mp/c] +lappend ans [list setpath MODULES_LMCONFLICT $mp/c&c] +testouterr_cmd sh "load $mp/c" $ans {} +testouterr_cmd sh "load --auto $mp/c" $ans {} + +setenv_loaded_module [list c] [list $mp/c] +setenv_path_var MODULES_LMCONFLICT c&c +set ans [list] +lappend ans [list setpath LOADEDMODULES c:$mp/b] +lappend ans [list setpath _LMFILES_ $mp/c:$mp/b] +lappend ans [list setpath MODULES_LMPREREQ $mp/b&c] +testouterr_cmd_re sh "load $mp/b" $ans {} + +setenv_loaded_module [list $mp/c] [list $mp/c] +setenv_path_var MODULES_LMCONFLICT $mp/c&c +testouterr_cmd_re sh "load c" OK {} + +set ans [list] +lappend ans [list unsetpath LOADEDMODULES] +lappend ans [list unsetpath _LMFILES_] +lappend ans [list unsetpath MODULES_LMCONFLICT] +testouterr_cmd_re sh "unload c" $ans {} +testouterr_cmd_re sh "unload $mp/c" $ans {} +testouterr_cmd_re sh "unload --auto c" $ans {} +testouterr_cmd_re sh "unload --auto $mp/c" $ans {} + +# requirement +setenv_loaded_module [list $mp/c] [list $mp/c] +setenv_path_var MODULES_LMCONFLICT $mp/c&c +set ans [list] +lappend ans [list setpath LOADEDMODULES $mp/c:b] +lappend ans [list setpath _LMFILES_ $mp/c:$mp/b] +lappend ans [list setpath MODULES_LMPREREQ b&c] +testouterr_cmd_re sh "load b" $ans {} +testouterr_cmd_re sh "load --auto b" $ans {} +set ans [list] +lappend ans [list setpath LOADEDMODULES $mp/c:$mp/b] +lappend ans [list setpath _LMFILES_ $mp/c:$mp/b] +lappend ans [list setpath MODULES_LMPREREQ $mp/b&c] +testouterr_cmd_re sh "load $mp/b" $ans {} +testouterr_cmd_re sh "load --auto $mp/b" $ans {} + +# conflict +setenv_loaded_module [list $mp/c:$mp/b] [list $mp/c:$mp/b] +setenv_path_var MODULES_LMCONFLICT $mp/c&c +setenv_path_var MODULES_LMPREREQ $mp/b&c +testouterr_cmd sh "load a" ERR [msg_load a [err_conflict a b]] +testouterr_cmd sh "load --auto a" ERR [msg_load a [err_conflict a b]] +testouterr_cmd sh "load $mp/a" ERR [msg_load $mp/a [err_conflict $mp/a b]] +testouterr_cmd sh "load --auto $mp/a" ERR [msg_load $mp/a [err_conflict $mp/a b]] + +# force conflict +set ans [list] +lappend ans [list setpath LOADEDMODULES $mp/c:$mp/b:a] +lappend ans [list setpath _LMFILES_ $mp/c:$mp/b:$mp/a] +lappend ans [list setpath MODULES_LMCONFLICT $mp/c&c:a&b] +testouterr_cmd_re sh "load --force a" $ans [msg_load a [err_conlof b]] +testouterr_cmd_re sh "load --auto --force a" $ans [msg_load a [err_conlof b]] +set ans [list] +lappend ans [list setpath LOADEDMODULES $mp/c:$mp/b:$mp/a] +lappend ans [list setpath _LMFILES_ $mp/c:$mp/b:$mp/a] +lappend ans [list setpath MODULES_LMCONFLICT $mp/c&c:$mp/a&b] +testouterr_cmd_re sh "load --force $mp/a" $ans [msg_load $mpre/a [err_conlof b]] +testouterr_cmd_re sh "load --auto --force $mp/a" $ans [msg_load $mpre/a [err_conlof b]] + + +# +# Cleanup +# + +# restore environment +setenv_path_var MODULEPATH $modpath +unsetenv_path_var MODULES_LMCONFLICT +unsetenv_path_var MODULES_LMPREREQ +unsetenv_loaded_module + +unsetenv_var MODULES_AUTO_HANDLING + +unset mp +unset mpre +unset ans diff --git a/testsuite/modules.50-cmds/376-switch-change-vers.exp b/testsuite/modules.50-cmds/376-switch-change-vers.exp new file mode 100644 index 000000000..33ccdac11 --- /dev/null +++ b/testsuite/modules.50-cmds/376-switch-change-vers.exp @@ -0,0 +1,318 @@ +############################################################################## +# Modules Revision 3.0 +# Providing a flexible user environment +# +# File: modules.50-cmds/%M% +# Revision: %I% +# First Edition: 2020/08/10 +# Last Mod.: %U%, %G% +# +# Authors: Xavier Delaruelle, xavier.delaruelle@cea.fr +# +# Description: Testuite testsequence +# Command: load +# Modulefiles: +# Sub-Command: module switch +# +# Comment: %C{ +# Test automatic resolution of modulefile dependencies defined +# through 'module switch' command in modulefiles where swaped-off +# module spec matches swaped-on module +# }C% +# +############################################################################## + +# CAUTION: it is not recommended to use the `switch` sub-command in +# modulefiles as this command is intended for the command-line for a 2in1 +# operation. Could be removed from the modulefile scope in a future +# release. Use `module unload` and `module load` commands in modulefiles +# instead. + +# skip tests if implicit_default option could not be overridden +if {[is_config_locked implicit_default]} { + send_user "\tskipping tests as implicit_default could not be overridden\n" +} else { + +set mp $modpath.deps +set mpre $modpathre.deps + +# setup specific environment +setenv_path_var MODULEPATH $mp + +# ensure load tests have implicit default enabled +setenv_var MODULES_IMPLICIT_DEFAULT 1 + +# ensure advanced version specifiers are enabled for these tests +setenv_var MODULES_ADVANCED_VERSION_SPEC 1 + + +# module switch swaa swaa/3.8 +setenv_var TESTSUITE_SWAA_SWITCH_SET1 1 +unsetenv_loaded_module +set ans [list] +lappend ans [list setpath LOADEDMODULES swaa/3.8:swab] +lappend ans [list setpath _LMFILES_ $mp/swaa/3.8:$mp/swab] +lappend ans [list setpath MODULES_LMPREREQ swab&swaa/3.8] +lappend ans [list setpath MODULES_LMNOTUASKED swaa/3.8] +lappend ans [list setpath MODULES_LMALTNAME swaa/3.8&as|swaa/default&as|swaa/latest] +testouterr_cmd_re sh {load swab} $ans [msg_top_load swab {} swaa/3.8 {}] + +setenv_loaded_module [list swaa/1.2] [list $mp/swaa/1.2] +testouterr_cmd_re sh {load swab} $ans [msg_top_load swab swaa/1.2 swaa/3.8 {}] +unsetenv_var TESTSUITE_SWAA_SWITCH_SET1 + +# ensure extended default is enabled for the remaining tests +setenv_var MODULES_EXTENDED_DEFAULT 1 + +# module switch swaa swaa@3 +setenv_var TESTSUITE_SWAA_SWITCH_SET2 1 +unsetenv_loaded_module +set ans [list] +lappend ans [list setpath LOADEDMODULES swaa/3.8:swab] +lappend ans [list setpath _LMFILES_ $mp/swaa/3.8:$mp/swab] +lappend ans [list setpath MODULES_LMPREREQ swab&swaa@3] +lappend ans [list setpath MODULES_LMNOTUASKED swaa/3.8] +lappend ans [list setpath MODULES_LMALTNAME swaa/3.8&as|swaa/default&as|swaa/latest] +testouterr_cmd_re sh {load swab} $ans [msg_top_load swab {} swaa/3.8 {}] + +setenv_loaded_module [list swaa/1.2] [list $mp/swaa/1.2] +testouterr_cmd_re sh {load swab} $ans [msg_top_load swab swaa/1.2 swaa/3.8 {}] +unsetenv_var TESTSUITE_SWAA_SWITCH_SET2 + +# module switch swaa@3 swaa@3.2: +setenv_var TESTSUITE_SWAA_SWITCH_SET3 1 +unsetenv_loaded_module +set ans [list] +lappend ans [list setpath LOADEDMODULES swaa/3.8:swab] +lappend ans [list setpath _LMFILES_ $mp/swaa/3.8:$mp/swab] +lappend ans [list setpath MODULES_LMPREREQ swab&swaa@3.2<] +lappend ans [list setpath MODULES_LMNOTUASKED swaa/3.8] +lappend ans [list setpath MODULES_LMALTNAME swaa/3.8&as|swaa/default&as|swaa/latest] +testouterr_cmd_re sh {load swab} $ans [msg_top_load swab {} swaa/3.8 {}] + +setenv_loaded_module [list swaa/3.2] [list $mp/swaa/3.2] +testouterr_cmd_re sh {load swab} $ans [msg_top_load swab swaa/3.2 swaa/3.8 {}] +unsetenv_var TESTSUITE_SWAA_SWITCH_SET3 + +# module switch swaa@1 swaa@3.2: +setenv_var TESTSUITE_SWAA_SWITCH_SET4 1 +unsetenv_loaded_module +set ans [list] +lappend ans [list setpath LOADEDMODULES swaa/3.8:swab] +lappend ans [list setpath _LMFILES_ $mp/swaa/3.8:$mp/swab] +lappend ans [list setpath MODULES_LMALTNAME swaa/3.8&as|swaa/default&as|swaa/latest] +lappend ans [list setpath MODULES_LMPREREQ swab&swaa@3.2<] +lappend ans [list setpath MODULES_LMCONFLICT swab&swaa@1] +lappend ans [list setpath MODULES_LMNOTUASKED swaa/3.8] +testouterr_cmd_re sh {load swab} $ans [msg_top_load swab {} swaa/3.8 {}] + +setenv_loaded_module [list swaa/1.2] [list $mp/swaa/1.2] +testouterr_cmd_re sh {load swab} $ans [msg_top_load swab swaa/1.2 swaa/3.8 {}] +unsetenv_var TESTSUITE_SWAA_SWITCH_SET4 + +# module switch swaa/1 swaa@3.2: +setenv_var TESTSUITE_SWAA_SWITCH_SET5 1 +unsetenv_loaded_module +set ans [list] +lappend ans [list setpath LOADEDMODULES swaa/3.8:swab] +lappend ans [list setpath _LMFILES_ $mp/swaa/3.8:$mp/swab] +lappend ans [list setpath MODULES_LMALTNAME swaa/3.8&as|swaa/default&as|swaa/latest] +lappend ans [list setpath MODULES_LMPREREQ swab&swaa@3.2<] +lappend ans [list setpath MODULES_LMCONFLICT swab&swaa/1] +lappend ans [list setpath MODULES_LMNOTUASKED swaa/3.8] +testouterr_cmd_re sh {load swab} $ans [msg_top_load swab {} swaa/3.8 {}] + +setenv_loaded_module [list swaa/1.2] [list $mp/swaa/1.2] +testouterr_cmd_re sh {load swab} $ans [msg_top_load swab swaa/1.2 swaa/3.8 {}] +unsetenv_var TESTSUITE_SWAA_SWITCH_SET5 + +# module switch swaa@1 swaa@3.8 +setenv_var TESTSUITE_SWAA_SWITCH_SET6 1 +unsetenv_loaded_module +set ans [list] +lappend ans [list setpath LOADEDMODULES swaa/3.8:swab] +lappend ans [list setpath _LMFILES_ $mp/swaa/3.8:$mp/swab] +lappend ans [list setpath MODULES_LMALTNAME swaa/3.8&as|swaa/default&as|swaa/latest] +lappend ans [list setpath MODULES_LMPREREQ swab&swaa@3.8] +lappend ans [list setpath MODULES_LMCONFLICT swab&swaa@1] +lappend ans [list setpath MODULES_LMNOTUASKED swaa/3.8] +testouterr_cmd_re sh {load swab} $ans [msg_top_load swab {} swaa/3.8 {}] + +setenv_loaded_module [list swaa/1.2] [list $mp/swaa/1.2] +testouterr_cmd_re sh {load swab} $ans [msg_top_load swab swaa/1.2 swaa/3.8 {}] +unsetenv_var TESTSUITE_SWAA_SWITCH_SET6 + +# module switch swaa@1 swaa/3.8 +setenv_var TESTSUITE_SWAA_SWITCH_SET7 1 +unsetenv_loaded_module +set ans [list] +lappend ans [list setpath LOADEDMODULES swaa/3.8:swab] +lappend ans [list setpath _LMFILES_ $mp/swaa/3.8:$mp/swab] +lappend ans [list setpath MODULES_LMALTNAME swaa/3.8&as|swaa/default&as|swaa/latest] +lappend ans [list setpath MODULES_LMPREREQ swab&swaa/3.8] +lappend ans [list setpath MODULES_LMCONFLICT swab&swaa@1] +lappend ans [list setpath MODULES_LMNOTUASKED swaa/3.8] +testouterr_cmd_re sh {load swab} $ans [msg_top_load swab {} swaa/3.8 {}] + +setenv_loaded_module [list swaa/1.2] [list $mp/swaa/1.2] +testouterr_cmd_re sh {load swab} $ans [msg_top_load swab swaa/1.2 swaa/3.8 {}] +unsetenv_var TESTSUITE_SWAA_SWITCH_SET7 + +# module switch swaa@1: swaa@3.8 +setenv_var TESTSUITE_SWAA_SWITCH_SET8 1 +unsetenv_loaded_module +set ans [list] +lappend ans [list setpath LOADEDMODULES swaa/3.8:swab] +lappend ans [list setpath _LMFILES_ $mp/swaa/3.8:$mp/swab] +lappend ans [list setpath MODULES_LMPREREQ swab&swaa@3.8] +lappend ans [list setpath MODULES_LMNOTUASKED swaa/3.8] +lappend ans [list setpath MODULES_LMALTNAME swaa/3.8&as|swaa/default&as|swaa/latest] +testouterr_cmd_re sh {load swab} $ans [msg_top_load swab {} swaa/3.8 {}] + +setenv_loaded_module [list swaa/3.0] [list $mp/swaa/3.0] +testouterr_cmd_re sh {load swab} $ans [msg_top_load swab swaa/3.0 swaa/3.8 {}] +unsetenv_var TESTSUITE_SWAA_SWITCH_SET8 + +# module switch swaa@2 swaa@3 +setenv_var TESTSUITE_SWAA_SWITCH_SET9 1 +unsetenv_loaded_module +set ans [list] +lappend ans [list setpath LOADEDMODULES swaa/3.8:swab] +lappend ans [list setpath _LMFILES_ $mp/swaa/3.8:$mp/swab] +lappend ans [list setpath MODULES_LMALTNAME swaa/3.8&as|swaa/default&as|swaa/latest] +lappend ans [list setpath MODULES_LMPREREQ swab&swaa@3] +lappend ans [list setpath MODULES_LMCONFLICT swab&swaa@2] +lappend ans [list setpath MODULES_LMNOTUASKED swaa/3.8] +testouterr_cmd_re sh {load swab} $ans [msg_top_load swab {} swaa/3.8 {}] + +setenv_loaded_module [list swaa/2/0] [list $mp/swaa/2/0] +testouterr_cmd_re sh {load swab} $ans [msg_top_load swab swaa/2/0 swaa/3.8 {}] +unsetenv_var TESTSUITE_SWAA_SWITCH_SET9 + +# module switch swaa/2@:6 swaa@3 +setenv_var TESTSUITE_SWAA_SWITCH_SET10 1 +unsetenv_loaded_module +set ans [list] +lappend ans [list setpath LOADEDMODULES swaa/3.8:swab] +lappend ans [list setpath _LMFILES_ $mp/swaa/3.8:$mp/swab] +lappend ans [list setpath MODULES_LMALTNAME swaa/3.8&as|swaa/default&as|swaa/latest] +lappend ans [list setpath MODULES_LMPREREQ swab&swaa@3] +lappend ans [list setpath MODULES_LMCONFLICT swab&swaa/2@<6] +lappend ans [list setpath MODULES_LMNOTUASKED swaa/3.8] +testouterr_cmd_re sh {load swab} $ans [msg_top_load swab {} swaa/3.8 {}] + +setenv_loaded_module [list swaa/2/2] [list $mp/swaa/2/2] +testouterr_cmd_re sh {load swab} $ans [msg_top_load swab swaa/2/2 swaa/3.8 {}] +unsetenv_var TESTSUITE_SWAA_SWITCH_SET10 + +# module switch swaa/2@0,8 swaa/3 +setenv_var TESTSUITE_SWAA_SWITCH_SET11 1 +unsetenv_loaded_module +set ans [list] +lappend ans [list setpath LOADEDMODULES swaa/3.8:swab] +lappend ans [list setpath _LMFILES_ $mp/swaa/3.8:$mp/swab] +lappend ans [list setpath MODULES_LMALTNAME swaa/3.8&as|swaa/default&as|swaa/latest] +lappend ans [list setpath MODULES_LMPREREQ swab&swaa/3] +lappend ans [list setpath MODULES_LMCONFLICT swab&swaa/2@0,8] +lappend ans [list setpath MODULES_LMNOTUASKED swaa/3.8] +testouterr_cmd_re sh {load swab} $ans [msg_top_load swab {} swaa/3.8 {}] + +setenv_loaded_module [list swaa/2/8] [list $mp/swaa/2/8] +testouterr_cmd_re sh {load swab} $ans [msg_top_load swab swaa/2/8 swaa/3.8 {}] +unsetenv_var TESTSUITE_SWAA_SWITCH_SET11 + +# module switch swaa@1 swaa@2 +setenv_var TESTSUITE_SWAA_SWITCH_SET12 1 +unsetenv_loaded_module +set ans [list] +lappend ans [list setpath LOADEDMODULES swaa/2/8:swab] +lappend ans [list setpath _LMFILES_ $mp/swaa/2/8:$mp/swab] +lappend ans [list setpath MODULES_LMALTNAME swaa/2/8&as|swaa/2/default&as|swaa/2/latest] +lappend ans [list setpath MODULES_LMPREREQ swab&swaa@2] +lappend ans [list setpath MODULES_LMCONFLICT swab&swaa@1] +lappend ans [list setpath MODULES_LMNOTUASKED swaa/2/8] +testouterr_cmd_re sh {load swab} $ans [msg_top_load swab {} swaa/2/8 {}] + +setenv_loaded_module [list swaa/1.2] [list $mp/swaa/1.2] +testouterr_cmd_re sh {load swab} $ans [msg_top_load swab swaa/1.2 swaa/2/8 {}] +unsetenv_var TESTSUITE_SWAA_SWITCH_SET12 + +# module switch swaa@1 swaa/2@6: +setenv_var TESTSUITE_SWAA_SWITCH_SET13 1 +unsetenv_loaded_module +set ans [list] +lappend ans [list setpath LOADEDMODULES swaa/2/8:swab] +lappend ans [list setpath _LMFILES_ $mp/swaa/2/8:$mp/swab] +lappend ans [list setpath MODULES_LMALTNAME swaa/2/8&as|swaa/2/default&as|swaa/2/latest] +lappend ans [list setpath MODULES_LMPREREQ swab&swaa/2@6<] +lappend ans [list setpath MODULES_LMCONFLICT swab&swaa@1] +lappend ans [list setpath MODULES_LMNOTUASKED swaa/2/8] +testouterr_cmd_re sh {load swab} $ans [msg_top_load swab {} swaa/2/8 {}] + +setenv_loaded_module [list swaa/1.2] [list $mp/swaa/1.2] +testouterr_cmd_re sh {load swab} $ans [msg_top_load swab swaa/1.2 swaa/2/8 {}] +unsetenv_var TESTSUITE_SWAA_SWITCH_SET13 + +# module switch swaa/2@0,8 swaa +setenv_var TESTSUITE_SWAA_SWITCH_SET14 1 +unsetenv_loaded_module +set ans [list] +lappend ans [list setpath LOADEDMODULES swaa/3.8:swab] +lappend ans [list setpath _LMFILES_ $mp/swaa/3.8:$mp/swab] +lappend ans [list setpath MODULES_LMALTNAME swaa/3.8&as|swaa/default&as|swaa/latest] +lappend ans [list setpath MODULES_LMPREREQ swab&swaa] +lappend ans [list setpath MODULES_LMCONFLICT swab&swaa/2@0,8] +lappend ans [list setpath MODULES_LMNOTUASKED swaa/3.8] +testouterr_cmd_re sh {load swab} $ans [msg_top_load swab {} swaa/3.8 {}] + +setenv_loaded_module [list swaa/2/0] [list $mp/swaa/2/0] +testouterr_cmd_re sh {load swab} $ans [msg_top_load swab swaa/2/0 swaa/3.8 {}] +unsetenv_var TESTSUITE_SWAA_SWITCH_SET14 + +# module switch swaa/2@6: swaa@2 +setenv_var TESTSUITE_SWAA_SWITCH_SET15 1 +unsetenv_loaded_module +set ans [list] +lappend ans [list setpath LOADEDMODULES swaa/2/8:swab] +lappend ans [list setpath _LMFILES_ $mp/swaa/2/8:$mp/swab] +lappend ans [list setpath MODULES_LMPREREQ swab&swaa@2] +lappend ans [list setpath MODULES_LMNOTUASKED swaa/2/8] +lappend ans [list setpath MODULES_LMALTNAME swaa/2/8&as|swaa/2/default&as|swaa/2/latest] +testouterr_cmd_re sh {load swab} $ans [msg_top_load swab {} swaa/2/8 {}] + +setenv_loaded_module [list swaa/2/8] [list $mp/swaa/2/8] +testouterr_cmd_re sh {load swab} $ans [msg_top_load swab swaa/2/8 swaa/2/8 {}] +unsetenv_var TESTSUITE_SWAA_SWITCH_SET15 + +# module switch swaa/2@6: swaa/2@:6 +setenv_var TESTSUITE_SWAA_SWITCH_SET16 1 +unsetenv_loaded_module +set ans [list] +lappend ans [list setpath LOADEDMODULES swaa/2/2:swab] +lappend ans [list setpath _LMFILES_ $mp/swaa/2/2:$mp/swab] +lappend ans [list setpath MODULES_LMPREREQ swab&swaa/2@<6] +lappend ans [list setpath MODULES_LMNOTUASKED swaa/2/2] +lappend ans [list setpath MODULES_LMCONFLICT swab&swaa/2@6<] +testouterr_cmd_re sh {load swab} $ans [msg_top_load swab {} swaa/2/2 {}] + +setenv_loaded_module [list swaa/2/8] [list $mp/swaa/2/8] +testouterr_cmd_re sh {load swab} $ans [msg_top_load swab swaa/2/8 swaa/2/2 {}] +unsetenv_var TESTSUITE_SWAA_SWITCH_SET16 + + +# +# Cleanup +# + +# restore environment +unsetenv_loaded_module +setenv_path_var MODULEPATH $modpath +unsetenv_var MODULES_IMPLICIT_DEFAULT +unsetenv_var MODULES_ADVANCED_VERSION_SPEC +unsetenv_var MODULES_EXTENDED_DEFAULT + +unset mp +unset mpre +unset ans + +} diff --git a/testsuite/modules.70-maint/120-autoinit.exp b/testsuite/modules.70-maint/120-autoinit.exp index 83744a8d5..078660cee 100644 --- a/testsuite/modules.70-maint/120-autoinit.exp +++ b/testsuite/modules.70-maint/120-autoinit.exp @@ -170,22 +170,22 @@ set func_end "\\s*_mlstatus=\\\$\\\?;\n$func_clean_ifs$end_silentdbg\\s*return \ if {$install_quarantinesupport eq y} { set func_modcmd_sh "\\s*if \\\[ -n \"\\\${_mlre:-}\" \\\]; then -\\s*eval `eval \\\${_mlre}$tclshlocre $modulecmd_pathre sh '\"\\$\\@\"'`; +\\s*eval `eval \\\${_mlre} $tclshlocre $modulecmd_pathre sh '\"\\$\\@\"'`; \\s*else \\s*eval `$tclshlocre $modulecmd_pathre sh \"\\$\\@\"`; \\s*fi;" set func_modcmd_bash "\\s*if \\\[ -n \"\\\${_mlre:-}\" \\\]; then -\\s*eval `eval \\\${_mlre}$tclshlocre $modulecmd_pathre bash '\"\\$\\@\"'`; +\\s*eval `eval \\\${_mlre} $tclshlocre $modulecmd_pathre bash '\"\\$\\@\"'`; \\s*else \\s*eval `$tclshlocre $modulecmd_pathre bash \"\\$\\@\"`; \\s*fi;" set func_modcmd_ksh "\\s*if \\\[ -n \"\\\${_mlre:-}\" \\\]; then -\\s*eval `eval \\\${_mlre}$tclshlocre $modulecmd_pathre ksh '\"\\$\\@\"'`; +\\s*eval `eval \\\${_mlre} $tclshlocre $modulecmd_pathre ksh '\"\\$\\@\"'`; \\s*else \\s*eval `$tclshlocre $modulecmd_pathre ksh \"\\$\\@\"`; \\s*fi;" set func_modcmd_zsh "\\s*if \\\[ -n \"\\\${_mlre:-}\" \\\]; then -\\s*eval `eval \\\${=_mlre}$tclshlocre $modulecmd_pathre zsh '\"\\$\\@\"'`; +\\s*eval `eval \\\${=_mlre} $tclshlocre $modulecmd_pathre zsh '\"\\$\\@\"'`; \\s*else \\s*eval `$tclshlocre $modulecmd_pathre zsh \"\\$\\@\"`; \\s*fi;" diff --git a/testsuite/modules.70-maint/270-adv_version_spec.exp b/testsuite/modules.70-maint/270-adv_version_spec.exp index 5d14b9cd4..812fc96f0 100644 --- a/testsuite/modules.70-maint/270-adv_version_spec.exp +++ b/testsuite/modules.70-maint/270-adv_version_spec.exp @@ -637,7 +637,7 @@ testouterr_cmd_re sh {load advvers2@7.0} $ans {} unsetenv_loaded_module # test unknown module -testouterr_cmd sh {load --auto advvers2@8.1.1} ERR [msg_load advvers2/8.1.1 $err_path'unknown@1.4.5' [err_prereq advvers2/8.1.1 unknown@1.4.5]] +testouterr_cmd sh {load --auto advvers2@8.1.1} ERR [msg_load advvers2/8.1.1 $err_path'unknown@1.4.5' [err_reqlo unknown@1.4.5]] set ans [list] lappend ans [list setpath LOADEDMODULES advvers2/8.1.2] lappend ans [list setpath _LMFILES_ $mp/advvers2/8.1.2] @@ -658,9 +658,9 @@ testouterr_cmd sh {load --auto advvers2@8.2.2} ERR [msg_load advvers2/8.2.2 [msg unsetenv_loaded_module # test mod@vers where a modulefile mod@vers exist -testouterr_cmd_re sh {load --auto advvers2@8.3.1} ERR [msg_load advvers2/8.3.1 $err_path'advvers@2.1' [err_prereq advvers2/8.3.1 advvers@2.1]] +testouterr_cmd_re sh {load --auto advvers2@8.3.1} ERR [msg_load advvers2/8.3.1 $err_path'advvers@2.1' [err_reqlo advvers@2.1]] setenv_loaded_module [list advvers@2.1] [list $mp/advvers@2.1] -testouterr_cmd_re sh {load --auto advvers2@8.3.1} ERR [msg_load advvers2/8.3.1 $err_path'advvers@2.1' [err_prereq advvers2/8.3.1 advvers@2.1]] +testouterr_cmd_re sh {load --auto advvers2@8.3.1} ERR [msg_load advvers2/8.3.1 $err_path'advvers@2.1' [err_reqlo advvers@2.1]] set ans [list] lappend ans [list setpath LOADEDMODULES advvers@2.1:advvers2/8.3.2] lappend ans [list setpath _LMFILES_ $mp/advvers@2.1:$mp/advvers2/8.3.2] @@ -693,7 +693,7 @@ if {![is_config_locked implicit_default]} { testouterr_cmd_re sh {load --auto advvers2@8.4.2} ERR [msg_load advvers2/8.4.2 [err_conflict advvers2/8.4.2 extdfl @1.3]] unsetenv_loaded_module - testouterr_cmd_re sh {load --auto advvers2@8.4.1} ERR [msg_load advvers2/8.4.1 "$err_nodefault'extdfl @1.4'" [err_prereq advvers2/8.4.1 "extdfl @1.4"]] + testouterr_cmd_re sh {load --auto advvers2@8.4.1} ERR [msg_load advvers2/8.4.1 "$err_nodefault'extdfl @1.4'" [err_reqlo "extdfl @1.4"]] setenv_var MODULES_IMPLICIT_DEFAULT 1 } unsetenv_loaded_module diff --git a/testsuite/modules.70-maint/271-adv_version_spec-in.exp b/testsuite/modules.70-maint/271-adv_version_spec-in.exp index e6624bac4..cbfe58e80 100644 --- a/testsuite/modules.70-maint/271-adv_version_spec-in.exp +++ b/testsuite/modules.70-maint/271-adv_version_spec-in.exp @@ -764,7 +764,7 @@ testouterr_cmd_re sh {load advvers5@7.0} $ans {} unsetenv_loaded_module # test unknown module -testouterr_cmd sh {load --auto advvers5@8.1.1} ERR [msg_load advvers5/8.1.1 $err_path'unknown@1.3.1,1.4.5' [err_prereq advvers5/8.1.1 unknown@1.3.1,1.4.5]] +testouterr_cmd sh {load --auto advvers5@8.1.1} ERR [msg_load advvers5/8.1.1 $err_path'unknown@1.3.1,1.4.5' [err_reqlo unknown@1.3.1,1.4.5]] set ans [list] lappend ans [list setpath LOADEDMODULES advvers5/8.1.2] lappend ans [list setpath _LMFILES_ $mp/advvers5/8.1.2] @@ -781,9 +781,9 @@ testouterr_cmd sh {load --auto advvers5@8.2.2} ERR [msg_load advvers5/8.2.2 [msg unsetenv_loaded_module # test mod@vers where a modulefile mod@vers exist -testouterr_cmd_re sh {load --auto advvers5@8.3.1} ERR [msg_load advvers5/8.3.1 $err_path'advvers@2.1,2.2' [err_prereq advvers5/8.3.1 advvers@2.1,2.2]] +testouterr_cmd_re sh {load --auto advvers5@8.3.1} ERR [msg_load advvers5/8.3.1 $err_path'advvers@2.1,2.2' [err_reqlo advvers@2.1,2.2]] setenv_loaded_module [list advvers@2.1] [list $mp/advvers@2.1] -testouterr_cmd_re sh {load --auto advvers5@8.3.1} ERR [msg_load advvers5/8.3.1 $err_path'advvers@2.1,2.2' [err_prereq advvers5/8.3.1 advvers@2.1,2.2]] +testouterr_cmd_re sh {load --auto advvers5@8.3.1} ERR [msg_load advvers5/8.3.1 $err_path'advvers@2.1,2.2' [err_reqlo advvers@2.1,2.2]] set ans [list] lappend ans [list setpath LOADEDMODULES advvers@2.1:advvers5/8.3.2] lappend ans [list setpath _LMFILES_ $mp/advvers@2.1:$mp/advvers5/8.3.2] @@ -816,7 +816,7 @@ if {![is_config_locked implicit_default]} { testouterr_cmd_re sh {load --auto advvers5@8.4.2} ERR [msg_load advvers5/8.4.2 [err_conflict advvers5/8.4.2 extdfl @1.3,2]] unsetenv_loaded_module - testouterr_cmd_re sh {load --auto advvers5@8.4.1} ERR [msg_load advvers5/8.4.1 "$err_nodefault'extdfl @1.4,1.2'" [err_prereq advvers5/8.4.1 "extdfl @1.4,1.2"]] + testouterr_cmd_re sh {load --auto advvers5@8.4.1} ERR [msg_load advvers5/8.4.1 "$err_nodefault'extdfl @1.4,1.2'" [err_reqlo "extdfl @1.4,1.2"]] setenv_var MODULES_IMPLICIT_DEFAULT 1 } unsetenv_loaded_module diff --git a/testsuite/modules.70-maint/272-adv_version_spec-range.exp b/testsuite/modules.70-maint/272-adv_version_spec-range.exp index 2e97d9cf0..326531dbc 100644 --- a/testsuite/modules.70-maint/272-adv_version_spec-range.exp +++ b/testsuite/modules.70-maint/272-adv_version_spec-range.exp @@ -883,7 +883,7 @@ testouterr_cmd_re sh {load advvers7@7.0} $ans {} unsetenv_loaded_module # test unknown module -testouterr_cmd sh {load --auto advvers7@8.1.1} ERR [msg_load advvers7/8.1.1 $err_path'unknown@:1.4.5' [err_prereq advvers7/8.1.1 unknown@:1.4.5]] +testouterr_cmd sh {load --auto advvers7@8.1.1} ERR [msg_load advvers7/8.1.1 $err_path'unknown@:1.4.5' [err_reqlo unknown@:1.4.5]] set ans [list] lappend ans [list setpath LOADEDMODULES advvers7/8.1.2] lappend ans [list setpath _LMFILES_ $mp/advvers7/8.1.2] @@ -900,9 +900,9 @@ testouterr_cmd sh {load --auto advvers7@8.2.2} ERR [msg_load advvers7/8.2.2 [msg unsetenv_loaded_module # test mod@vers where a modulefile mod@vers exist -testouterr_cmd_re sh {load --auto advvers7@8.3.1} ERR [msg_load advvers7/8.3.1 $err_path'advvers@2.1:' [err_prereq advvers7/8.3.1 advvers@2.1:]] +testouterr_cmd_re sh {load --auto advvers7@8.3.1} ERR [msg_load advvers7/8.3.1 $err_path'advvers@2.1:' [err_reqlo advvers@2.1:]] setenv_loaded_module [list advvers@2.1] [list $mp/advvers@2.1] -testouterr_cmd_re sh {load --auto advvers7@8.3.1} ERR [msg_load advvers7/8.3.1 $err_path'advvers@2.1:' [err_prereq advvers7/8.3.1 advvers@2.1:]] +testouterr_cmd_re sh {load --auto advvers7@8.3.1} ERR [msg_load advvers7/8.3.1 $err_path'advvers@2.1:' [err_reqlo advvers@2.1:]] set ans [list] lappend ans [list setpath LOADEDMODULES advvers@2.1:advvers7/8.3.2] lappend ans [list setpath _LMFILES_ $mp/advvers@2.1:$mp/advvers7/8.3.2] @@ -935,7 +935,7 @@ if {![is_config_locked implicit_default]} { testouterr_cmd_re sh {load --auto advvers7@8.4.2} ERR [msg_load advvers7/8.4.2 [err_conflict advvers7/8.4.2 extdfl @1.3:2]] unsetenv_loaded_module - testouterr_cmd_re sh {load --auto advvers7@8.4.1} ERR [msg_load advvers7/8.4.1 "$err_nodefault'extdfl @1.4:1.5'" [err_prereq advvers7/8.4.1 "extdfl @1.4:1.5"]] + testouterr_cmd_re sh {load --auto advvers7@8.4.1} ERR [msg_load advvers7/8.4.1 "$err_nodefault'extdfl @1.4:1.5'" [err_reqlo "extdfl @1.4:1.5"]] setenv_var MODULES_IMPLICIT_DEFAULT 1 } unsetenv_loaded_module diff --git a/version.inc.in b/version.inc.in index 1c655f839..10fce9d7a 100644 --- a/version.inc.in +++ b/version.inc.in @@ -1,7 +1,7 @@ # Release definitions shared across the Makefiles of this project # run make to generate version.inc -MODULES_RELEASE := 4.5.1 +MODULES_RELEASE := 4.5.3 MODULES_BUILD_HASH := $Format:%h$ MODULES_BUILD_REFS := $Format:%D$ MODULES_BUILD_FDATE := $Format:%ci$