Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ydb_env_set preserves ydb_gbldir/gtmgbldir and ydb_routines/gtmroutines #197

Closed
ksbhaskar opened this issue Apr 9, 2018 · 5 comments
Closed
Assignees
Labels
Milestone

Comments

@ksbhaskar
Copy link
Member

ksbhaskar commented Apr 9, 2018

Final Release Note

Values of environment variables ydb_gbldir/gtmgbldir and ydb_routines/gtmroutines set before sourcing ydb_env_set are preserved. The ydb_* versions of the environment variables is used if both ydb_* and gtm* versions are defined. (#197)

Description

The ydb_env_set command overrides any previous value set for the ydb_routines and gtmroutines environment variable. This is a regression from the gtmprofile file, which did not, and which the new file was intended to replace.

$ echo $ydb_routines $gtmroutines
/tmp/tmp1 /tmp/tmp2
$ . /usr/local/lib/yottadb/r120/ydb_env_set
$ echo $ydb_routines $gtmroutines
/home/user/.yottadb/r1.20_x86_64/o*(/home/user/.yottadb/r1.20_x86_64/r /home/user/.yottadb/r) /usr/local/lib/yottadb/r120/libyottadbutil.so /home/user/.yottadb/r1.20_x86_64/o*(/home/user/.yottadb/r1.20_x86_64/r /home/user/.yottadb/r) /usr/local/lib/yottadb/r120/libyottadbutil.so
$ 

ydb_gbldir is also affected.

Draft Release Note

ydb_gbldir/gtmgbldir and ydb_routines/gtmroutines set before running ydb_env_set are preserved. The ydb_* versions of the environment variables is used if both ydb_* and gtm* versions are defined.

@ksbhaskar ksbhaskar added wontfix and removed wontfix labels Apr 9, 2018
@ksbhaskar ksbhaskar self-assigned this Apr 9, 2018
@nars1 nars1 added the bug label May 2, 2018
@nars1 nars1 added this to the r130 milestone May 2, 2018
@nars1 nars1 assigned ChristopherEdwards and unassigned ksbhaskar May 7, 2018
@ChristopherEdwards
Copy link
Collaborator

Is the intention is to have the script NOT modify $ydb_gbldir and $ydb_routines/$gtmroutines (so after the script runs they are the same values they were before the script ran?

@ksbhaskar
Copy link
Member Author

ksbhaskar commented May 7, 2018 via email

@ksbhaskar
Copy link
Member Author

ksbhaskar commented May 7, 2018 via email

@ChristopherEdwards
Copy link
Collaborator

Thanks!

@ChristopherEdwards
Copy link
Collaborator

Pull request #238 resolves this and is merged.

nars1 added a commit to nars1/YottaDB that referenced this issue May 8, 2018
… if needs a preceding semicolon)

Before this fix, the following error used to show up if one sourced ydb_env_set

$ . ydb_env_set
sh: 82: ydb_env_set: Syntax error: end of file unexpected (expecting "fi")
nars1 added a commit that referenced this issue May 8, 2018
…ds a preceding semicolon)

Before this fix, the following error used to show up if one sourced ydb_env_set

$ . ydb_env_set
sh: 82: ydb_env_set: Syntax error: end of file unexpected (expecting "fi")
@ksbhaskar ksbhaskar changed the title ydb_env_set overrides ydb_routines/gtmroutines environment variables ydb_env_set preserves ydb_gbldir/gtmgbldir and ydb_routines/gtmroutines May 8, 2018
nars1 added a commit to nars1/YottaDB that referenced this issue May 16, 2018
… to not be correctly set after ydb_env_set

Simple test case that illustrates the problem with the current mainline.

$ . /usr/local/lib/yottadb/r122/ydb_env_set
$ env | grep ydb_routines
ydb_routines=/usr/local/lib/yottadb/r122/libyottadbutil.so

But with r1.20, the same test shows ydb_routines with a lot more values
and these are needed for the "ydb" script to work fine.

$ . /usr/local/lib/yottadb/r120/ydb_env_set
$ env | grep ydb_routines
ydb_routines=/home/user/.yottadb/r1.20_x86_64/o*(/home/user/.yottadb/r1.20_x86_64/r /home/user/.yottadb/r) /usr/local/lib/yottadb/r120/libyottadbutil.so

With the fix, ydb_routines gets set to a value just like what it used to be in r1.20.
nars1 added a commit that referenced this issue May 16, 2018
… be correctly set after ydb_env_set

Simple test case that illustrates the problem with the current mainline.

$ . /usr/local/lib/yottadb/r122/ydb_env_set
$ env | grep ydb_routines
ydb_routines=/usr/local/lib/yottadb/r122/libyottadbutil.so

But with r1.20, the same test shows ydb_routines with a lot more values
and these are needed for the "ydb" script to work fine.

$ . /usr/local/lib/yottadb/r120/ydb_env_set
$ env | grep ydb_routines
ydb_routines=/home/user/.yottadb/r1.20_x86_64/o*(/home/user/.yottadb/r1.20_x86_64/r /home/user/.yottadb/r) /usr/local/lib/yottadb/r120/libyottadbutil.so

With the fix, ydb_routines gets set to a value just like what it used to be in r1.20.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants