Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 428418 - sci-libs/openfoam-2.1.1 foamInstall in OpenFOAM's bashrc set wrong
Summary: sci-libs/openfoam-2.1.1 foamInstall in OpenFOAM's bashrc set wrong
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Patrick Lauer
URL:
Whiteboard:
Keywords:
Depends on: 478370
Blocks:
  Show dependency tree
 
Reported: 2012-07-28 11:41 UTC by Bernhard Dunkl
Modified: 2013-07-29 08:24 UTC (History)
5 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
openfoam-2.2.0-bashrc.patch (openfoam-2.2.0-bashrc.patch,403 bytes, patch)
2013-05-15 10:11 UTC, Andrew Savchenko
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Bernhard Dunkl 2012-07-28 11:41:53 UTC
foamInstall in /usr/lib/OpenFOAM/OpenFOAM-2.1.1/etc/bashrc is set to $HOME/$WM_PROJECT, but should be set to /usr/lib/$WM_PROJECT.
Comment 1 Stephen Bosch 2013-02-21 22:05:42 UTC
I can confirm this in 2.1.1-r1:

################################################################################
# USER EDITABLE PART: Changes made here may be lost with the next upgrade
#
# either set $FOAM_INST_DIR before sourcing this file or set
# 'foamInstall' below to where OpenFOAM is installed
#
# Location of the OpenFOAM installation
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
foamInstall=$HOME/$WM_PROJECT
# foamInstall=~$WM_PROJECT
# foamInstall=/opt/$WM_PROJECT
# foamInstall=/usr/local/$WM_PROJECT
#
# END OF (NORMAL) USER EDITABLE PART
################################################################################
Comment 2 Stephen Bosch 2013-03-19 21:35:38 UTC
This bug persists for the new 2.2.0 ebuild.

Manual changes to the bashrc after emerging are bad because they are not protected; bashrc will be overwritten with each new version.

Can we move the environment to a conf.d or env.d file to make it Gentoo friendly?
Comment 3 Stephen Bosch 2013-03-19 21:38:35 UTC
Alternatively, we could just have the ebuild set $FOAM_INST_DIR as suggested in the bashrc...
Comment 4 Andrew Savchenko gentoo-dev 2013-05-15 10:11:30 UTC
Created attachment 348376 [details, diff]
openfoam-2.2.0-bashrc.patch

This change works fine four users of our HPC cluster on ~amd64.
Comment 5 Richard Kenney 2013-05-18 07:22:00 UTC
I second leaving the install folder as is and patching the .bashrc file in the ebuild.

At the moment my startOF aliases achieve the same thing:

alias startOF21='export FOAM_INST_DIR=/usr/lib64/OpenFOAM;source /usr/lib64/OpenFOAM/OpenFOAM-2.1.1/etc/bashrc'
alias startOF22='export FOAM_INST_DIR=/usr/lib64/OpenFOAM;source /usr/lib64/OpenFOAM/OpenFOAM-2.2.0/etc/bashrc'
Comment 6 Patrick Lauer gentoo-dev 2013-07-29 08:24:04 UTC
+  29 Jul 2013; Patrick Lauer <patrick@gentoo.org> +openfoam-2.2.1.ebuild,                                                                                                                                                                   
+  metadata.xml:                                                                                                                                                                                                                             
+  Bump, fixes #478370 #428418 #463538