Comment # 101 on bug 1203617 from Dirk Weber
(In reply to Dr. Werner Fink from comment #93)
> This fixes *MC* only but all other environments in a plasma session are
> *still* not set

The problem in plasma sessions only exists for packages which export shell
functions in their /etc/profile.d scriptlet. 
Because "simple environment variables" which are exported by the /etc/profile.d
scriptlets are available in the plasma session.


A plasma session on a Leap 15.6 VM in konsole and checking for mc shows the mc
function is not defined and therefore the mc binary is started by executing mc
in a shell:

user@leap156:~$ echo $PROFILEREAD
true
user@leap156:~$ type -t mc
file
user@leap156:~$ type  mc
mc is /usr/bin/mc
user@leap156:~$ lsb-release -r
Release:        15.6
user@leap156:~$ rpm -q aaa_base
aaa_base-84.87+git20180409.04c9dae-150300.10.20.1.x86_64

user@leap156:~$ grep mc /etc/bash.bashrc
user@leap156:~$ 


-------------------------
a plasma session on a Tumbleweed VM in a konsole with bash and checking for mc
- here the function is defined because the /etc/profile.d/mc.sh is also called
from /etc/bash.bashrc. Here mc on the shell executes the function mc and after
quitting the mc the shell stays in the directory mc was in before:

user@tumbleweed:~$ echo $PROFILEREAD
true
user@tumbleweed:~$ type -t mc
function
user@tumbleweed:~$ type  mc
mc is a function
mc () 
{ 
    . /usr/share/mc/mc-wrapper.sh
}
user@tumbleweed:~$ lsb-release -r
Release:        20241115
user@tumbleweed:~$ rpm -q aaa_base
aaa_base-84.87+git20240906.742565b-1.1.x86_64

user@tumbleweed:~$ grep mc /etc/bash.bashrc
if test -s /etc/profile.d/mc.sh
then . /etc/profile.d/mc.sh
elif test -s /usr/share/mc/mc.sh
then . /usr/share/mc/mc.sh


--------------------
An attempt to fine affected scriptles in /etc/profile.d/ on Leap 15.6 which
define shell functions:
user@leap156:~$ grep -E "\\(\\)" /etc/profile.d/* |grep -v 's/'
/etc/profile.d/alias.ash:suspend () { local -; set +j; kill -TSTP 0; }
/etc/profile.d/alias.ash:bltin () { command ${1+"$@"}; }
/etc/profile.d/alias.ash:pushd () {
/etc/profile.d/alias.ash:popd () {
/etc/profile.d/alias.ash:dirs () { echo "`pwd` $DSTACK"; return 0; }
/etc/profile.d/alias.bash:    startx  () {
/etc/profile.d/alias.bash:    remount () { /bin/mount -o remount,${1+"$@"} ; }
/etc/profile.d/alias.bash:    _which () {
/etc/profile.d/complete.bash:_compreply_ ()
/etc/profile.d/complete.bash:    s="${s}        (){}[]\`\$"
/etc/profile.d/complete.bash:_cdpath_ ()
/etc/profile.d/complete.bash:_cd_ ()
/etc/profile.d/complete.bash:    *[*?[]*)       COMPREPLY=()                   
        # use bashdefault
/etc/profile.d/complete.bash:    *)             COMPREPLY=()                   
        # use (bash)default
/etc/profile.d/complete.bash:_exp_ ()
/etc/profile.d/complete.bash:    *[*?[]*)               COMPREPLY=()           
        # use bashdefault
/etc/profile.d/complete.bash:   local -a reply=()
/etc/profile.d/complete.bash:_gdb_ ()
/etc/profile.d/complete.bash:               COMPREPLY=()
/etc/profile.d/complete.bash:_man_ ()
/etc/profile.d/complete.bash:_rootpath_ ()
/etc/profile.d/complete.bash:           COMPREPLY=()
/etc/profile.d/complete.bash:_ls_ ()
/etc/profile.d/complete.bash:    *[*?[]*)       COMPREPLY=()                   
        # use bashdefault
/etc/profile.d/complete.bash:    *)             COMPREPLY=()                   
    # use (bash)default
/etc/profile.d/complete.bash:    _completion_loader ()
/etc/profile.d/complete.tcsh:               'n/-e/f/' 'n/*/()/'
/etc/profile.d/complete.tcsh:   'c/-/()/' \
/etc/profile.d/complete.tcsh:   'c/-/()/' \
/etc/profile.d/gawk.sh:gawkpath_default () {
/etc/profile.d/gawk.sh:gawkpath_prepend () {
/etc/profile.d/gawk.sh:gawkpath_append () {
/etc/profile.d/gawk.sh:gawklibpath_default () {
/etc/profile.d/gawk.sh:gawklibpath_prepend () {
/etc/profile.d/gawk.sh:gawklibpath_append () {
/etc/profile.d/ls.bash:     _ls ()
/etc/profile.d/ls.zsh:z_ls ()
/etc/profile.d/mc.sh:mc()
/etc/profile.d/sh.ssh:test_lc()
/etc/profile.d/vte.sh:__vte_osc7 () {
/etc/profile.d/vte.sh:__vte_prompt_command() {
/etc/profile.d/xdg-environment.sh:uniquefy_search_path ()
/etc/profile.d/xdg-environment.sh:setup_xdg_paths() {




It seems the functionality missed most is the one of mc considering the number
of related bugs.
Maybe the users of the other affected functions are using other desktops or
they just applied a workaround by calling the scriptlet defining the function
they miss from their ~/.bashrc.

BTW: as Leap 15.5 will soon reach the end of its maintenance periode maybe the
version of this bug should be changed to Leap 15.6?


You are receiving this mail because: