[phenixbb] phenix.phaser PATH problem

Edward A. Berry BerryE at upstate.edu
Thu Jul 21 07:55:58 PDT 2011


G P wrote:

> But Ralf's suggestion seems more amazing, why and how does the order of
> source command in .bashrc affect? I am wondering.
>


>         Thanks a lot for your help. I changed the order and it works
>         now. But I
>         am wondering why? Is that means the .bashrc script will read
>         lines from
>         down to up which allow it to see the line of source for phenix
>         first?
>


No- when you try to execute the command, the path is searched and
the first executable instance of command is executed.
If the setup scripts add the new directories to the front of the
path, then whichever ran last will have its directory first in
the path,and it will be used.

CCP4 has the option of adding its directories to the end of the
path, so it will not take over some command that is already
working but if nothing else is available the path is searched
to the very end and the ccp4 command is found.

in ccp4.setup-bash:
# By default, CCP4 directories are prepended to the beginning of paths (PATH,
# LD_LIBRARY_PATH, and DYLD_LIBRARY_PATH). If ccp4_first_in_path is set
# to 0, then they will be appended to the end of paths.
# When deciding local policy, bear in mind the possible existence of
# other CCP4 installations, and the possibility of non-CCP4 programs
# with conflicting names.
ccp4_first_in_path=1

~~~~~~~~~~~~`
     if [ $ccp4_first_in_path -eq 1 ]; then
       setenv PATH ${dir}:${PATH}
     else
       setenv PATH ${PATH}:${dir}
     fi

(and likewise for classpath, shared library path, python path etc)


More information about the phenixbb mailing list