SDP-812

tom_tyler (C. Thomas Tyler)
C. Thomas Tyler created this job , modified by swarm-user
Closed
p4verify.sh P4D_VERSION unbound variable w/'-o MISSING' and env not sourced.

An error indicating 'P4D_VERSION: unbound variable' is displayed if
p4verify.sh is called without the SDP environment having been sourced
first, e.g. with p4_vars being sourced in ~perforce/.bashrc, or if
p4verify.sh is called with 'p4master_run' or 'run_if_{master|replica|edge}'
as all such scripts source p4_vars before calling scripts.

The workaround is to source p4_vars one way or an another.

A proper fix is a code change to source p4_vars before P4D_VERSION is
checked.
28975Fixed bug with P4D_VERSION unbound variable if '-o MISSING'
is used and SDP shell environment has not been sourced.

The script sourced p4_vars to set P4D_VERSION, but too late,
after P4D_VERSION was referenced. This has been fixed.

Moved cmd() function to be in the 'Local Functions' section
of the file.
28974Fixed bug with P4D_VERSION unbound variable if '-o MISSING'
is used and SDP shell environment has not been sourced.

The script sourced p4_vars to set P4D_VERSION, but too late,
after P4D_VERSION was referenced. This has been fixed.

Moved cmd() function to be in the 'Local Functions' section
of the file.

#review-28975
  • Details
  • Comments -
Status
Closed
Project
perforce-software-sdp
Severity
C
Reported By
C. Thomas Tyler
Reported Date
Modified By
swarm-user
Modified Date
Owned By
tom_tyler
Component
core-unix
Type
Bug