eg_db_config assumes it runs from source directory

Bug #1170351 reported by Jason Stephenson
18
This bug affects 4 people
Affects Status Importance Assigned to Milestone
Evergreen
Triaged
Medium
Unassigned

Bug Description

Evergreen Version: master as of 20130419/2.4-beta
OpenSRF Version: latest master
PostgreSQL Version: 9.2.4

eg_db_config is installed to /openils/bin. However, its code still makes assumptions that it is being run from the source checkout/tarball directory.

The following console output illustrates this:

opensrf@jasondev:~$ eg_db_config --create-offline
Can't exec "/openils/bin/../extras/eg_config": No such file or directory at /openils/bin/eg_db_config line 275.
Use of uninitialized value $temp[0] in scalar chomp at /openils/bin/eg_db_config line 276.
Can't exec "/openils/bin/../extras/eg_config": No such file or directory at /openils/bin/eg_db_config line 282.
Use of uninitialized value $temp[0] in scalar chomp at /openils/bin/eg_db_config line 283.
Error: /openils/bin/../sql/Pg/build-db.sh does not exist.

I haven't looked into a fix, yet, but our scripts need to be made relocatable, and they should be better organized in the source if they are meant to be run from there, plus runnable once installed.

Tags: config script
Ben Shum (bshum)
Changed in evergreen:
milestone: none → 2.4.0-rc
status: New → Triaged
Ben Shum (bshum)
Changed in evergreen:
milestone: 2.4.0-rc → 2.5.0-alpha
importance: Undecided → Medium
Dan Wells (dbw2)
Changed in evergreen:
milestone: 2.5.0-m1 → none
no longer affects: evergreen/2.4
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.