Ticket #35 (closed defect: fixed)

Opened 3 years ago

Last modified 3 years ago

WORK_PATH cannot be modified after confmanlib.sh is loaded

Reported by: blee Owned by: blee
Priority: blocker Milestone: confman-2.0
Component: confsync Version: 1.9.0b
Keywords: Cc:

Description

confmanlib.sh sets some variables based on the value of WORK_PATH:

WCLOCKFILE="${WORK_PATH}/confman.lock"
METADIR="${WORK_PATH}/meta"

confsync modifies WORK_PATH to be a temporary directory:

tmpdir=$(conf_tmp_dir)

tar -xzf $tarball -C $tmpdir
rm -rf $tarball
WORK_PATH="$tmpdir"

and the change is not seen by other variables that have already been set relative to the old value of WORK_PATH. This breaks confsync severely when $HOME/src/conf does not exist, or worse $HOME/src/conf is out of sync relative to the export tarball.

The way global variables are set will probably have to be redesigned.

Change History

comment:1 Changed 3 years ago by blee

confaudit is affected as well.

comment:2 Changed 3 years ago by blee

Please update conf_export and conf_revision when this is done.

comment:3 Changed 3 years ago by blee

  • Owner changed from confman-developers@… to blee
  • Status changed from new to assigned

comment:4 Changed 3 years ago by blee

  • Status changed from assigned to accepted

comment:5 Changed 3 years ago by blee

(In [373])
Replace WCLOCKFILE global variable with function conf_wcopy_lockfile.

See #35

comment:6 Changed 3 years ago by blee

  • Status changed from accepted to closed
  • Resolution set to fixed

(In [374]) Replacing global variables with functions:

  • METADIR -> conf_meta_dir
  • RECIPEDIR -> conf_recipe_dir
  • RECIPE_PATH -> conf_recipe_path

Also deleted unused variable REPO_VERSION_FILE.

Also removed workarounds in conf_export and conf_revision.

Fixes #35

Note: See TracTickets for help on using tickets.