Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 428418

Summary: sci-libs/openfoam-2.1.1 foamInstall in OpenFOAM's bashrc set wrong
Product: Gentoo Linux Reporter: Bernhard Dunkl <bernhard.d>
Component: Current packagesAssignee: Patrick Lauer <patrick>
Status: RESOLVED FIXED    
Severity: normal CC: bircoph, gibgibon, oli.borm, proxy-maint, richard.kenney
Priority: Normal    
Version: unspecified   
Hardware: AMD64   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on: 478370    
Bug Blocks:    
Attachments: openfoam-2.2.0-bashrc.patch

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