diff --git a/Makefile b/Makefile index 27619de8..33c40ae6 100644 --- a/Makefile +++ b/Makefile @@ -401,6 +401,7 @@ sed -e 's|@prefix@|$(prefix)|g' \ -e 's|@nearlyforbiddendays@|$(nearlyforbiddendays)|g' \ -e 's|@tagabbrev@|$(tagabbrev)|g' \ -e 's|@tagcolorname@|$(tagcolorname)|g' \ + -e 's|@stickypurge@|$(stickypurge)|g' \ -e 's|@availoutput@|$(availoutput)|g' \ -e 's|@availterseoutput@|$(availterseoutput)|g' \ -e 's|@listoutput@|$(listoutput)|g' \ diff --git a/Makefile.inc.in b/Makefile.inc.in index 667e06a3..c8679522 100644 --- a/Makefile.inc.in +++ b/Makefile.inc.in @@ -121,6 +121,9 @@ nearlyforbiddendays := @nearlyforbiddendays@ tagabbrev := @tagabbrev@ tagcolorname := @tagcolorname@ +# error behavior when purging sticky module +stickypurge := @stickypurge@ + # check version on magic cookie mcookieversioncheck := @mcookieversioncheck@ diff --git a/configure b/configure index 4b34b53b..16c929ff 100755 --- a/configure +++ b/configure @@ -38,7 +38,8 @@ searchmatch modulepath loadedmodules quarantinevars wa277 advversspec ml \ windowssupport nearlyforbiddendays implicitrequirement tagabbrev \ tagcolorname mcookieversioncheck availoutput availterseoutput listoutput \ listterseoutput editor variantshortcut bashcompletiondir fishcompletiondir \ -zshcompletiondir tcllinter tcllinteropts nagelfardatadir nagelfaraddons" +zshcompletiondir tcllinter tcllinteropts nagelfardatadir nagelfaraddons \ +stickypurge" libarglist=() # flags to know if argument has been specified on command-line @@ -116,6 +117,7 @@ windowssupport=n nearlyforbiddendays=14 tagabbrev='auto-loaded=aL:loaded=L:hidden=H:hidden-loaded=H:forbidden=F:nearly-forbidden=nF:sticky=S:super-sticky=sS:keep-loaded=kL' tagcolorname= +stickypurge=error mcookieversioncheck=y availoutput='modulepath:alias:dirwsym:sym:tag:variantifspec:key' availterseoutput='modulepath:alias:dirwsym:sym:tag:variantifspec' @@ -368,6 +370,11 @@ Optional Packages: the module they are attached to. Each element in TAGLIST is a tag name or abbreviation (elements in TAGLIST are separated by \`:') [$tagcolorname] + --with-sticky-purge=VALUE + define the kind of error to render when unloading + a sticky or super-sticky module during a purge. + Raise an \`error' or report a \`warning' or be + \`silent'. [$stickypurge] --with-avail-output=LIST specify content to report on avail sub-command regular output. elements accepted in LIST are: @@ -747,6 +754,13 @@ for arg in "$@"; do tagabbrev=$(get_package_value "$arg") ;; --with-tag-color-name*|--without-tag-color-name) tagcolorname=$(get_package_value "$arg") ;; + --with-sticky-purge*|--without-sticky-purge) + stickypurge=$(get_package_value "$arg" "error") ; + allowedval=" error warning silent " ; + if [ "${allowedval// $stickypurge /}" = "$allowedval" ]; then + echo_error "Bad value for option \`--with-sticky-purge'"\ + "Allowed values are:$allowedval" + fi ;; --with-avail-output*|--without-avail-output) availoutput=$(get_package_value "$arg" "$availoutput") ; allowedval=" modulepath alias dirwsym indesym sym tag key variant variantifspec " ; diff --git a/site.exp.in b/site.exp.in index 4ff6e3d8..78fd1bed 100644 --- a/site.exp.in +++ b/site.exp.in @@ -85,6 +85,8 @@ set install_nearlyforbiddendays "@nearlyforbiddendays@" set install_tagabbrev "@tagabbrev@" set install_tagcolorname "@tagcolorname@" +set install_stickypurge "@stickypurge@" + set install_mcookieversioncheck "@mcookieversioncheck@" set install_availoutput "@availoutput@" diff --git a/tcl/init.tcl.in b/tcl/init.tcl.in index 47ecc0c3..96522b6d 100644 --- a/tcl/init.tcl.in +++ b/tcl/init.tcl.in @@ -118,7 +118,8 @@ array set g_config_defs [list\ silent_shell_debug {MODULES_SILENT_SHELL_DEBUG @silentshdbgsupport@ 0 b {0\ 1}}\ siteconfig {{} {@etcdir@/siteconfig.tcl} 0 s}\ - sticky_purge {MODULES_STICKY_PURGE error 0 s {error warning silent}}\ + sticky_purge {MODULES_STICKY_PURGE {@stickypurge@} 0 s {error warning\ + silent}}\ tag_abbrev {MODULES_TAG_ABBREV {@tagabbrev@} 0 l {} {} initConfTagAbbrev}\ tag_color_name {MODULES_TAG_COLOR_NAME {@tagcolorname@} 0 l {} {}\ initConfTagColorName}\