sqenv.sh is not idempotent

Bug #1401216 reported by Chris Sheedy
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Trafodion
Fix Committed
Low
Chris Sheedy

Bug Description

Invoking sqenv.sh more than once in the same shell should be a safe operation, and not increase the size of environment variables. Setting SQ_VERBOSE=1 is an easy way to see the growth in $PATH each time sqenv.sh is invoked.

Changed in trafodion:
importance: Undecided → Low
tags: added: dev-environment
Changed in trafodion:
assignee: nobody → Chris Sheedy (chris-sheedy)
status: New → In Progress
Revision history for this message
Chris Sheedy (chris-sheedy) wrote :

An example message that should not be given is in the developer environment, when starting with clean source code for trafodion/core :

$ . ./sqenvr.sh
$ . ./sqenvr.sh
The environment changed from a previous execution of this script.
This is not supported. To change environments, do the following:
  sqstop
  <make any changes, e.g. update Hadoop, HBase, MySQL>
  start a new shell and source in sqenv.sh
  rm $MY_SQROOT/etc/ms.env
  sqgen
  start a new shell and source in sqenv.sh
  sqstart
$

Revision history for this message
Chris Sheedy (chris-sheedy) wrote :

Gerrit change 811 on 2014-12-11 modified sqenvcom.sh to fix this problem.

Changed in trafodion:
status: In Progress → Fix Committed
milestone: none → r1.0
Revision history for this message
Chris Sheedy (chris-sheedy) wrote :

In r1.1, this is almost fixed, the only problem is that the MANPATH variable keeps growing.
For example, sqenvr.sh was invoked several times like this:

$ . ./sqenvr.sh
$ env > env_2
$ . ./sqenvr.sh
$ env > env_3
$ . ./sqenvr.sh
$ env > env_4

Differences between the env_2, env_3 and env_4 files were only the growth of MANPATH:

$ diff env_3 env_4
< MANPATH=:<dir>/sqf/export/share/man:<dir>/sqf/export/share/man
---
> MANPATH=:<dir>/sqf/export/share/man:<dir>/sqf/export/share/man:<dir>/sqf/export/share/man
$

Changed in trafodion:
milestone: r1.0 → r2.0
Changed in trafodion:
status: Fix Committed → In Progress
Revision history for this message
Chris Sheedy (chris-sheedy) wrote :

Fixed in change 1634 merged into master branch on 2015-05-15.

Changed in trafodion:
status: In Progress → Fix Committed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.