Ticket #35 (closed defect: fixed)

Opened 15 months ago

Last modified 14 months 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

Changed 15 months ago by blee

confaudit is affected as well.

Changed 14 months ago by blee

Please update conf_export and conf_revision when this is done.

Changed 14 months ago by blee

  • owner changed from confman-developers@… to blee
  • status changed from new to assigned

Changed 14 months ago by blee

  • status changed from assigned to accepted

Changed 14 months ago by blee

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

See #35

Changed 14 months 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.