From e41546662a6b29536527d1170719ead512beb4f2 Mon Sep 17 00:00:00 2001 From: Robert McLay Date: Fri, 29 Mar 2024 17:53:07 -0500 Subject: [PATCH] Issue #679: update configure options to use DOWNSTREAM instead of PERMANENT --- Makefile.in | 4 ++-- aclocal.m4 | 2 +- configure | 27 +++++++++++++++++++++++++++ configure.ac | 18 +++++++++--------- 4 files changed, 39 insertions(+), 12 deletions(-) diff --git a/Makefile.in b/Makefile.in index 78275ef34..48697e7d5 100644 --- a/Makefile.in +++ b/Makefile.in @@ -72,7 +72,7 @@ AUTO_SWAP := @AUTO_SWAP@ SPIDER_CACHE_DIRS := @SPIDER_CACHE_DIRS@ LEGACY_ORDERING := @LEGACY_ORDERING@ EXPORT_MODULE := @EXPORT_MODULE@ -LMOD_PERMANENT_CONFLICTS := @LMOD_PERMANENT_CONFLICTS@ +LMOD_DOWNSTREAM_CONFLICTS := @LMOD_DOWNSTREAM_CONFLICTS@ BASENAME := @BASENAME@ UPDATE_VERSION := LUA_PATH="$(srcdir)/tools/?.lua;$(SYS_LUA_PATH)" $(PATH_TO_LUA) $(srcdir)/proj_mgmt/updateVersion BUILD_V_src := LUA_PATH="$(srcdir)/tools/?.lua;$(SYS_LUA_PATH)" LUA_CPATH="$(SYS_LUA_CPATH)" $(PATH_TO_LUA) $(srcdir)/proj_mgmt/buildVersion_src @@ -289,7 +289,7 @@ __installMe: -e 's|@fast_tcl_interp@|$(FAST_TCL_INTERP)|g' \ -e 's|@settarg_cmd@|$(SETTARG_CMD)|g' \ -e 's|@lmod_config_dir@|$(LMOD_CONFIG_DIR)|g' \ - -e 's|@lmod_downstream_conflicts@|$(LMOD_PERMANENT_CONFLICTS)|g' \ + -e 's|@lmod_downstream_conflicts@|$(LMOD_DOWNSTREAM_CONFLICTS)|g' \ -e "s|@my_shell@|$$fn|g" \ -e 's|@tclsh@|$(PATH_TO_TCLSH)|g' \ -e 's|@ls@|$(PATH_TO_LS)|g' \ diff --git a/aclocal.m4 b/aclocal.m4 index 3c501945e..e0eec4c1c 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -77,7 +77,7 @@ echo "LMOD_CONFIG_DIR............................................." : $LMOD_CONF echo "Use ~/.config/lmod directory only..........................." : $USE_DOT_CONFIG_DIR_ONLY echo "Display Extensions w/ module avail.........................." : $AVAIL_EXTENSIONS echo "Dynamic Spider Cache support................................" : $DYNAMIC_SPIDER_CACHE -echo "Module Conflicts remembered................................." : $LMOD_PERMANENT_CONFLICTS +echo "Module Conflicts remembered................................." : $LMOD_DOWNSTREAM_CONFLICTS echo "Allow for extended default.(ml intel/17 #-> intel/17.0.4)..." : $EXTENDED_DEFAULT #" diff --git a/configure b/configure index 16a771138..5a735f4cb 100755 --- a/configure +++ b/configure @@ -691,6 +691,7 @@ CACHED_LOADS LUA_INCLUDE TMOD_FIND_FIRST TMOD_PATH_RULE +LMOD_DOWNSTREAM_CONFLICTS PIN_VERSIONS IGNORE_DIRS SETTARG @@ -798,6 +799,7 @@ with_mpathSearch with_settarg with_ignoreDirs with_pinVersions +with_downstreamConflicts with_tmodPathRule with_tmodFindFirst with_lua_include @@ -1490,6 +1492,9 @@ Optional Packages: --with-ignoreDirs=ans list of directories to ignore [[.svn,.git,.hg,.bzr]] --with-pinVersions=ans Save/Restore will use the current version instead of changing with the default.[[no]] + --with-downstreamConflicts=ans + module conflicts are remembered for later loads. + [[no]] --with-tmodPathRule=ans If path entry is already there then do not append/prepend.[[no]] --with-tmodFindFirst=ans @@ -4033,6 +4038,27 @@ fi +# Check whether --with-downstreamConflicts was given. +if test ${with_downstreamConflicts+y} +then : + withval=$with_downstreamConflicts; LMOD_DOWNSTREAM_CONFLICTS="$withval" + LMOD_DOWNSTREAM_CONFLICTS=`echo $LMOD_DOWNSTREAM_CONFLICTS | tr '[:upper:]' '[:lower:]'` + VALID_YN $LMOD_DOWNSTREAM_CONFLICTS "--with-downstreamConflicts=ans: ans must be yes or no" + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: LMOD_DOWNSTREAM_CONFLICTS=$with_downstreamConflicts" >&5 +printf "%s\n" "LMOD_DOWNSTREAM_CONFLICTS=$with_downstreamConflicts" >&6; } + printf "%s\n" "#define LMOD_DOWNSTREAM_CONFLICTS \"$with_downstreamConflicts\"" >>confdefs.h + +else $as_nop + withval="no" + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: LMOD_DOWNSTREAM_CONFLICTS=$withval" >&5 +printf "%s\n" "LMOD_DOWNSTREAM_CONFLICTS=$withval" >&6; } + LMOD_DOWNSTREAM_CONFLICTS="$withval" + printf "%s\n" "#define LMOD_DOWNSTREAM_CONFLICTS \"$withval\"" >>confdefs.h + +fi + + + # Check whether --with-tmodPathRule was given. if test ${with_tmodPathRule+y} then : @@ -6867,6 +6893,7 @@ echo "LMOD_CONFIG_DIR............................................." : $LMOD_CONF echo "Use ~/.config/lmod directory only..........................." : $USE_DOT_CONFIG_DIR_ONLY echo "Display Extensions w/ module avail.........................." : $AVAIL_EXTENSIONS echo "Dynamic Spider Cache support................................" : $DYNAMIC_SPIDER_CACHE +echo "Module Conflicts remembered................................." : $LMOD_DOWNSTREAM_CONFLICTS echo "Allow for extended default.(ml intel/17 #-> intel/17.0.4)..." : $EXTENDED_DEFAULT #" diff --git a/configure.ac b/configure.ac index f32295d22..3298fa9c4 100644 --- a/configure.ac +++ b/configure.ac @@ -426,19 +426,19 @@ AC_ARG_WITH(pinVersions, PIN_VERSIONS="$withval" AC_DEFINE_UNQUOTED(PIN_VERSIONS, "$withval"))dnl -AC_SUBST(LMOD_PERMANENT_CONFLICTS) +AC_SUBST(LMOD_DOWNSTREAM_CONFLICTS) AC_ARG_WITH(downstreamConflicts, AS_HELP_STRING([--with-downstreamConflicts=ans],[module conflicts are remembered for later loads. [[no]]]), - LMOD_PERMANENT_CONFLICTS="$withval" - LMOD_PERMANENT_CONFLICTS=`echo $LMOD_PERMANENT_CONFLICTS | tr '@<:@:upper:@:>@' '@<:@:lower:@:>@'` - VALID_YN $LMOD_PERMANENT_CONFLICTS "--with-downstreamConflicts=ans: ans must be yes or no" - AC_MSG_RESULT([LMOD_PERMANENT_CONFLICTS=$with_downstreamConflicts]) - AC_DEFINE_UNQUOTED(LMOD_PERMANENT_CONFLICTS, "$with_downstreamConflicts")dnl + LMOD_DOWNSTREAM_CONFLICTS="$withval" + LMOD_DOWNSTREAM_CONFLICTS=`echo $LMOD_DOWNSTREAM_CONFLICTS | tr '@<:@:upper:@:>@' '@<:@:lower:@:>@'` + VALID_YN $LMOD_DOWNSTREAM_CONFLICTS "--with-downstreamConflicts=ans: ans must be yes or no" + AC_MSG_RESULT([LMOD_DOWNSTREAM_CONFLICTS=$with_downstreamConflicts]) + AC_DEFINE_UNQUOTED(LMOD_DOWNSTREAM_CONFLICTS, "$with_downstreamConflicts")dnl , withval="no" - AC_MSG_RESULT([LMOD_PERMANENT_CONFLICTS=$withval]) - LMOD_PERMANENT_CONFLICTS="$withval" - AC_DEFINE_UNQUOTED(LMOD_PERMANENT_CONFLICTS, "$withval"))dnl + AC_MSG_RESULT([LMOD_DOWNSTREAM_CONFLICTS=$withval]) + LMOD_DOWNSTREAM_CONFLICTS="$withval" + AC_DEFINE_UNQUOTED(LMOD_DOWNSTREAM_CONFLICTS, "$withval"))dnl AC_SUBST(TMOD_PATH_RULE) AC_ARG_WITH(tmodPathRule,