mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
BUG: Incomplete cleanup of paraview environment (fixes #369)
- LD_LIBRARY_PATH was not being cleaned at all when switching between paraview versions. - PATH was cleaned against the third-party paraview-*, although 3rd party paraview is installed as ParaView-*. The additional cleanup for ParaView_DIR may not catch this (if it was unset elsewhere).
This commit is contained in:
@ -3,7 +3,7 @@
|
||||
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
# \\ / O peration |
|
||||
# \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
# \\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
|
||||
# \\/ M anipulation | Copyright (C) 2016-2017 OpenCFD Ltd.
|
||||
#------------------------------------------------------------------------------
|
||||
# License
|
||||
# This file is part of OpenFOAM.
|
||||
@ -60,11 +60,15 @@ set cmake_version=cmake-system
|
||||
|
||||
if ( ! $?ParaView_DIR ) setenv ParaView_DIR
|
||||
|
||||
# Clean the PATH
|
||||
if ( ! $?ParaView_DIR ) setenv ParaView_DIR
|
||||
set cleaned=`$WM_PROJECT_DIR/bin/foamCleanPath "$PATH" "$ParaView_DIR $WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/cmake- $WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/paraview-"`
|
||||
# Clean PATH and LD_LIBRARY_PATH
|
||||
set cleaned=`$WM_PROJECT_DIR/bin/foamCleanPath "$PATH" "$ParaView_DIR $WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/cmake- $WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/ParaView-"`
|
||||
if ( $status == 0 ) setenv PATH $cleaned
|
||||
|
||||
if ( $?LD_LIBRARY_PATH ) then
|
||||
set cleaned=`$WM_PROJECT_DIR/bin/foamCleanPath "$LD_LIBRARY_PATH" "$ParaView_DIR $WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/ParaView-"`
|
||||
if ( $status == 0 ) setenv LD_LIBRARY_PATH $cleaned
|
||||
endif
|
||||
|
||||
# ThirdParty cmake
|
||||
set cmake=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/$cmake_version
|
||||
if ( -r $cmake/bin/cmake ) then
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
# \\ / O peration |
|
||||
# \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
# \\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
|
||||
# \\/ M anipulation | Copyright (C) 2016-2017 OpenCFD Ltd.
|
||||
#------------------------------------------------------------------------------
|
||||
# License
|
||||
# This file is part of OpenFOAM.
|
||||
@ -61,13 +61,20 @@ cmake_version=cmake-system
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
# Clean the PATH
|
||||
# Clean PATH and LD_LIBRARY_PATH
|
||||
cleaned=$($WM_PROJECT_DIR/bin/foamCleanPath "$PATH" \
|
||||
"$ParaView_DIR \
|
||||
$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/cmake- \
|
||||
$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/ParaView-" \
|
||||
) && PATH="$cleaned"
|
||||
|
||||
if [ -n "$LD_LIBRARY_PATH" ]
|
||||
then
|
||||
cleaned=$($WM_PROJECT_DIR/bin/foamCleanPath "$LD_LIBRARY_PATH" \
|
||||
"$ParaView_DIR \
|
||||
$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/cmake- \
|
||||
$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/paraview-" \
|
||||
) \
|
||||
&& PATH="$cleaned"
|
||||
$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/ParaView-" \
|
||||
) && LD_LIBRARY_PATH="$cleaned"
|
||||
fi
|
||||
|
||||
# ThirdParty cmake
|
||||
cmake=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/$cmake_version
|
||||
|
||||
Reference in New Issue
Block a user