Bug 1575479
Summary: | row 58: export: _moduleraw is not a function | ||||||
---|---|---|---|---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Marco Motta <marco.motta> | ||||
Component: | environment-modules | Assignee: | Jan Synacek <jsynacek> | ||||
Status: | CLOSED ERRATA | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | ||||
Severity: | unspecified | Docs Contact: | |||||
Priority: | unspecified | ||||||
Version: | 28 | CC: | jsynacek, orion, praiskup, xavier.delaruelle | ||||
Target Milestone: | --- | ||||||
Target Release: | --- | ||||||
Hardware: | Unspecified | ||||||
OS: | Linux | ||||||
Whiteboard: | |||||||
Fixed In Version: | environment-modules-4.1.3-1.fc28 | Doc Type: | If docs needed, set a value | ||||
Doc Text: | Story Points: | --- | |||||
Clone Of: | Environment: | ||||||
Last Closed: | 2018-06-26 17:34:20 UTC | Type: | Bug | ||||
Regression: | --- | Mount Type: | --- | ||||
Documentation: | --- | CRM: | |||||
Verified Versions: | Category: | --- | |||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
Cloudforms Team: | --- | Target Upstream Version: | |||||
Embargoed: | |||||||
Attachments: |
|
Description
Marco Motta
2018-05-07 04:42:30 UTC
I have the same error message when I use mc to browse inside archives (rpm, zip). I've opened a bug for mc, but it seems it is not caused by mc itself. Moreover it does not happen with all users. I am using environment-modules-4.1.2-1.fc28.x86_64 and all the latest packages as of now. https://bugzilla.redhat.com/show_bug.cgi?id=1575518 This is not bug in mc. Surely the problem is of environment-modules, because the error message is on line 58 of /usr/share/Modules/init/bash, and: $ dnf provides /usr/share/Modules/init/bash Sincronizzazione cache non riuscita per il repo 'ksplice-uptrack', disabilitazione in corso. Ultima verifica della scadenza dei metadati: 22:57:39 fa il dom 06 mag 2018 18:21:59 CEST. environment-modules-4.1.2-1.fc28.x86_64 : Provides dynamic modification of a : user's environment Repo : @System Corrispondenza trovata in: Nome file : /usr/share/Modules/init/bash environment-modules-4.1.2-1.fc28.x86_64 : Provides dynamic modification of a : user's environment Repo : fedora Corrispondenza trovata in: Nome file : /usr/share/Modules/init/bash I think this is related to work with this bug: https://bugzilla.redhat.com/show_bug.cgi?id=1575479 Strange, I upgraded to Fedora 28, and the bug is back: $ (echo "∅"; echo "∞"; echo "∅") | sort | uniq ∅ [marco@localhost ~]$ It has something to do with the current environment. Happens in GNOME: xterm, Konsole and GNOME terminal but not in a linux console outside GNOME. And there is indeed a pattern here From GNOME andrea@bomba:~/projects/cvs/poolviewer$ env | grep BASH_FUNC BASH_FUNC_module%%=() { unset _mlre _mlIFS _mlshdbg; BASH_FUNC_switchml%%=() { typeset swfound=1; BASH_FUNC_scl%%=() { if [ "$1" = "load" -o "$1" = "unload" ]; then from a console BASH_FUNC_module%%=() { _moduleraw "$@" 2>&1 BASH_FUNC_switchml%%=() { typeset swfound=1; BASH_FUNC_scl%%=() { if [ "$1" = "load" -o "$1" = "unload" ]; then BASH_FUNC__moduleraw%%=() { unset _mlre _mlIFS _mlshdbg; And you can see the 4th is missing in GNOME. What does this all mean? I fixed it by resetting the bash templates (rc and profile). My home folder is really old and I guess something in bash has changed, so the old bashrc had become incompatible over time. (In reply to Marco Motta from comment #4) > Strange, I upgraded to Fedora 28, and the bug is back: > > $ (echo "∅"; echo "∞"; echo "∅") | sort | uniq > ∅ > [marco@localhost ~]$ Excuse me, but I send comment #4 to the wrong bug. I was not able to reproduce the issue with the guide lines provided above. However this issue can easily be reproduced with the following sequence: $ cat test.sh unset module unset moduleraw source /usr/share/Modules/init/bash $ bash test.sh 2>errlog; cat errlog /usr/share/Modules/init/bash: line 48: export: _moduleraw: not a function Issue is due to the test controlling the creation of the _moduleraw shell function. In modulecmd.tcl this test checks stderr whereas in init scripts test checks stdout. So if stderr is not detected as attached to a terminal but stdout is, modulecmd.tcl autoinit command does not produce code for the _moduleraw shell function but afterward shell init script still tries to export this non-existent function. Created attachment 1438875 [details]
init/export _moduleraw if stderr attached to term
Attached patch fixes the issue. I can be applied over current v4.1.2 package and will be part of the next bugfix release (v4.1.3)
Fixed in upstream bugfix release v4.1.3 environment-modules-4.1.3-1.fc28 has been submitted as an update to Fedora 28. https://bodhi.fedoraproject.org/updates/FEDORA-2018-082f52eeac environment-modules-4.1.3-1.fc28 has been pushed to the Fedora 28 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2018-082f52eeac environment-modules-4.1.3-1.fc28 has been pushed to the Fedora 28 stable repository. If problems still persist, please make note of it in this bug report. |