View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0002031 | OpenFOAM | Bug | public | 2016-03-20 19:07 | 2016-05-09 12:58 |
Reporter | wyldckat | Assigned To | henry | ||
Priority | low | Severity | minor | Reproducibility | sometimes |
Status | resolved | Resolution | fixed | ||
Fixed in Version | dev | ||||
Summary | 0002031: etc/bashrc + foamCleanPath + Deb installation = removal of other applications from PATH in /opt/ | ||||
Description | I had tripped over something similar this week, namely where I has installed other stuff on "~/OpenFOAM", but I'm essentially reflecting the following report on the forum: http://www.cfd-online.com/Forums/openfoam-bugs/167065-openfoams-bashrc-removing-elements-path.html - it was written on the 23rd of February, 2016. The main issue occurs when installing the Deb packages on Ubuntu, where the "etc/bashrc" script will remove all suspicious paths that are indexed to the path stored in the shell variable "FOAM_INST_DIR". | ||||
Steps To Reproduce | 1. Install OpenFOAM Deb packages on Ubuntu. 2. If we have other software installed in "/opt" which is added to the shell environment variables PATH, LD_LIBRARY_PATH and MANPATH - e.g. a binary installation of a LaTeX suite - and then we source OpenFOAM's "/opt/openfoam*/etc/bashrc", the result is that the environment variables are purged accordingly. | ||||
Additional Information | I haven't sorted out yet a proposition for fixing this, but it felt it was best to report it and to keep it on record. I'm looking into the code in a few minutes and will give some feedback on possible solutions. | ||||
Tags | No tags attached. | ||||
|
As far as I can figure out, there are a few possible solutions I can think of: 1- To make the Deb packages install at "/opt/OpenFOAM". Or something like "/opt/OpenFOAM.deb", just to make it easier to tell apart from the people who manually install at "/opt/OpenFOAM". 2- To have in "config.sh/unset" a less aggressive option for environment clean up. 3- Or to have a selective option in "config.sh/unset", i.e. to remove only the explicit paths that are defined in other OpenFOAM shell environment variables ("WM_*" and "FOAM_*"). Then call this script from "etc/bashrc" at least when in Deb mode. |
|
I believe this is resolved in OpenFOAM-dev by commit f7e4137ee5539e01c6aee192985230fb76e2b115 etc/bashrc, etc/cshrc: Filter $WM_PROJECT_DIR from paths rather than $FOAM_INST_DIR Additionally filter $ParaView_DIR from paths in config.sh/paraview and config.csh/paraview Please let me know if there are any issues with this change. |
|
|
|
I've attached the package "etc_more_fixes.tar.gz" that has a few more updates that were missing, namely: - When "$WM_PROJECT_SITE" does not point to an existing folder, it's unset by default. Therefore, we must also clean up "$FOAM_SITE_APPBIN" and "$FOAM_SITE_LIBBIN". - I thought about doing this the other way around, namely to always set "$WM_PROJECT_SITE", but this way it always cleans up what was left by previous versions. - The "unset" scripts needed the changes made in the previous commit and the current attached package. - And it also needed to clean up "$ParaView_DIR" and to unset some of the more recent variables, such as "$WM_COMPILER_TYPE". In the package are the following files: etc/bashrc etc/config.csh/unset etc/config.sh/unset etc/cshrc I didn't test the "cshrc" script stack, therefore the attached changes could have a tiny/big flaw somewhere :( |
|
Thanks for sorting-out "unset", I didn't look to see if corresponding changes needed to be made. The bash setup looks fine but csh is less forgiving about undefined variable and is currently not working. I will look into it tomorrow. |
|
I have applied the changes and fixed the problem with csh so it should work OK now. |
|
I believe this issues is now resolved, please reopen if further problems arise. |
Date Modified | Username | Field | Change |
---|---|---|---|
2016-03-20 19:07 | wyldckat | New Issue | |
2016-03-20 20:37 | wyldckat | Note Added: 0006049 | |
2016-05-05 15:41 | henry | Note Added: 0006238 | |
2016-05-05 23:13 | wyldckat | File Added: etc_more_fixes.tar.gz | |
2016-05-05 23:18 | wyldckat | Note Added: 0006239 | |
2016-05-05 23:28 | henry | Note Added: 0006240 | |
2016-05-05 23:40 | henry | Note Added: 0006241 | |
2016-05-09 12:58 | henry | Note Added: 0006251 | |
2016-05-09 12:58 | henry | Status | new => resolved |
2016-05-09 12:58 | henry | Fixed in Version | => dev |
2016-05-09 12:58 | henry | Resolution | open => fixed |
2016-05-09 12:58 | henry | Assigned To | => henry |