Opened 19 years ago
Closed 19 years ago
#915 closed enhancement (fixed)
bash psconfig --list has very unintended consequences, including messed-up path
| Reported by: | Owned by: | eugene | |
|---|---|---|---|
| Priority: | high | Milestone: | |
| Component: | psconfig | Version: | unspecified |
| Severity: | minor | Keywords: | |
| Cc: |
Description
psconfig.csh has a great number of useful options. psconfig.bash apparently only allows --help or a version number; trying psconfig.bash with the --list argument leads to all kinds of unexpected behaviour, including a messed-up path that doesn't find ls any more.
The logic is something like: I do psconfig, but I don't know what versions are there (~/.psconfigrc points PSCONFDIR to /IPP/psconfig/).
jester@aida77 ~$ alias psconfig='source /IPP/psconfig/psconfig.bash'
jester@aida77 ~$ psconfig
PSCONFDIR is not set : run psconfig with an argument to setup
PSVERSION is not set : run psconfig with an argument to setup
ARCH is not set : run psconfig with an argument to setup
PSCONFDIR: Undefined variable.
So I try psconfig --list to see what I can do...
Here's what happens (with set -x):
++ '-z'
++ PSCONFIG_DIR=/IPP/psconfig
++ (( 1 == 0 ))
++ --list == \-\-\h\e\l\p
++ version=--list
+++ /bin/csh /IPP/psconfig/psconfig.csh --psconfigure --list
PSCONFDIR: Undefined variable.
++ psconfigure=
+++ /bin/csh /IPP/psconfig/psconfig.csh --psautogen --list
PSCONFDIR: Undefined variable.
++ psautogen=
+++ /bin/csh /IPP/psconfig/psconfig.csh --psperlbuild --list
PSCONFDIR: Undefined variable.
++ psperlbuild=
++ alias psconfigure= --with-cfitsio=/IPP/shared
++ alias psautogen=
++ alias psperlbuild=
+++ /bin/csh /IPP/psconfig/psconfig.csh --psconfdir --list
PSCONFDIR: Undefined variable.
++ export PSCONFDIR=
++ PSCONFDIR=
+++ /bin/csh /IPP/psconfig/psconfig.csh --psversion --list
++ export 'PSVERSION=PSCONFDIR :
bin : bin
Documents : Documents
IPP : IPP
tgz : ippcfg
out : psconfig_list_bash
public_html : public_html
qso : qso
sm : sm'
++ PSVERSION='PSCONFDIR :
bin : bin
Documents : Documents
IPP : IPP
tgz : ippcfg
out : psconfig_list_bash
public_html : public_html
qso : qso
sm : sm'
+++ /bin/csh /IPP/psconfig/psconfig.csh --path --list
++ export 'PATH=PSCONFDIR :
bin : bin
Documents : Documents
IPP : IPP
tgz : ippcfg
out : psconfig_list_bash
public_html : public_html
qso : qso
sm : sm'
++ PATH='PSCONFDIR :
bin : bin
Documents : Documents
IPP : IPP
tgz : ippcfg
out : psconfig_list_bash
public_html : public_html
qso : qso
sm : sm'
+++ /bin/csh /IPP/psconfig/psconfig.csh --arch --list
id: Command not found.
id: Command not found.
uname: Command not found.
uname: Command not found.
++ export 'ARCH=PSCONFDIR :
bin : bin
Documents : Documents
IPP : IPP
tgz : ippcfg
out : psconfig_list_bash
public_html : public_html
qso : qso
sm : sm'
++ ARCH='PSCONFDIR :
bin : bin
Documents : Documents
IPP : IPP
tgz : ippcfg
out : psconfig_list_bash
public_html : public_html
qso : qso
sm : sm'
+++ /bin/csh /IPP/psconfig/psconfig.csh --ld_library_path --list
id: Command not found.
id: Command not found.
uname: Command not found.
uname: Command not found.
++ export 'LD_LIBRARY_PATH=PSCONFDIR :
bin : bin
Documents : Documents
IPP : IPP
tgz : ippcfg
out : psconfig_list_bash
public_html : public_html
qso : qso
sm : sm'
++ LD_LIBRARY_PATH='PSCONFDIR :
bin : bin
Documents : Documents
IPP : IPP
tgz : ippcfg
out : psconfig_list_bash
public_html : public_html
qso : qso
sm : sm'
+++ /bin/csh /IPP/psconfig/psconfig.csh --pkg_config_path --list
id: Command not found.
id: Command not found.
uname: Command not found.
uname: Command not found.
++ export 'PKG_CONFIG_PATH=PSCONFDIR :
bin : bin
Documents : Documents
IPP : IPP
tgz : ippcfg
out : psconfig_list_bash
public_html : public_html
qso : qso
sm : sm'
++ PKG_CONFIG_PATH='PSCONFDIR :
bin : bin
Documents : Documents
IPP : IPP
tgz : ippcfg
out : psconfig_list_bash
public_html : public_html
qso : qso
sm : sm'
+++ /bin/csh /IPP/psconfig/psconfig.csh --aclocal_flags --list
id: Command not found.
id: Command not found.
uname: Command not found.
uname: Command not found.
++ export 'ACLOCAL_FLAGS=PSCONFDIR :
bin : bin
Documents : Documents
IPP : IPP
tgz : ippcfg
out : psconfig_list_bash
public_html : public_html
qso : qso
sm : sm'
++ ACLOCAL_FLAGS='PSCONFDIR :
bin : bin
Documents : Documents
IPP : IPP
tgz : ippcfg
out : psconfig_list_bash
public_html : public_html
qso : qso
sm : sm'
+++ /bin/csh /IPP/psconfig/psconfig.csh --perl5lib --list
id: Command not found.
id: Command not found.
uname: Command not found.
uname: Command not found.
++ export 'PERL5LIB=PSCONFDIR :
bin : bin
Documents : Documents
IPP : IPP
tgz : ippcfg
out : psconfig_list_bash
public_html : public_html
qso : qso
sm : sm'
++ PERL5LIB='PSCONFDIR :
bin : bin
Documents : Documents
IPP : IPP
tgz : ippcfg
out : psconfig_list_bash
public_html : public_html
qso : qso
sm : sm'

added --list option to psconfig.bash (passes through to psconfig.csh)