Comment # 5 on bug 1219979 from Jean-Claude Dole
Thank you very much for taking the time to answer me.
Rightly or wrongly, for years I have been using the following piece of code (or
somethings similar) to make variables and function definitions accessible to
everyone:
---->

if test -z "$SOURCED_SYS_COMMON_VAR" ; then
        test -s
/backup_sys/VAR/MY_ENV_VAR/zzzz2_system_common_general_env_var_full.sh  &&  .
/backup_sys/VAR/MY_ENV_VAR/zzzz2_system_common_general_env_var_full.sh
        if [[ "$E_FILES_DIFFER" -ne 109 ]] ; then 
                MY_LOGGER2_bash_bashrc_local "E_FILES_DIFFER -ne 109 --- COMMON
VAR NOT SOURCED : zzzz2_system_common_general_env_var_full.sh"  "0"
        else
                readonly SOURCED_SYS_COMMON_VAR=true
                export SOURCED_SYS_COMMON_VAR
        fi
else
                MY_LOGGER2_bash_bashrc_local "COMMON VAR ALREADY SOURCED :
zzzz2_system_common_general_env_var_full.sh"  "5"
fi
if test -z "$SOURCED_SYS_COMMON_FUNC" ; then
        test -s /backup_sys/VAR/MY_ENV_VAR/zzzz1_system_common_function_full.sh
 &&  . /backup_sys/VAR/MY_ENV_VAR/zzzz1_system_common_function_full.sh
        if [[ -z "$(LC_ALL=C type stop_or_continue 2>/dev/null)" ]] ; then
                MY_LOGGER2_bash_bashrc_local "COMMON FUNC NOT SOURCED :
zzzz1_system_common_function_full.sh"  "0"
        else
                readonly SOURCED_SYS_COMMON_FUNC=true
                export SOURCED_SYS_COMMON_FUNC
        fi
else
                MY_LOGGER2_bash_bashrc_local "COMMON FUNC ALREADY SOURCED :
zzzz1_system_common_function_full.sh"  "5"
fi

<----

That has worked for me from the old days up to 15.4
See screenshots :
15.1
https://paste.opensuse.org/pastes/d0119db2c2fa

15.4
https://paste.opensuse.org/pastes/c8b8584b73fd

15.5 and 15.6 same behaviour : Function definitions does not survive.
https://paste.opensuse.org/pastes/86e970296d2c

Konsole Opensuse for each test : 
    Command       : konsole
    Configuration : builtin

So somethings has change since 15.5
You will notice that this only concerns function definitions. 

Of course if I remove the one-shot read >>>  if test -z
"$SOURCED_SYS_COMMON_FUNC" ; then  <<< there is no problem but the files
definitions are reread indefinitely.


You are receiving this mail because: