Roundup Tracker - Issues

Message4558

Author wking
Recipients wking
Date 2012-05-15.18:11:59
Message-id <20120515181137.GA27415@odin.tremily.us>
In-reply-to
With an already-intialised roundup configured with:

  …
  [main]
  database: rel/db
  …

Calls to

  $ roundup-admin -i inst/home initialise

from `/cwd/` will remove

  /cwd/inst/home/rel/db/backend_name

and create

  /cwd/inst/home/inst/home/rel/db/backend_name

which is obviously broken, due to duplicate `inst/home`s.

The duplication occurs because `database` is a `FilePathOption`, so
`tracker.config.DATABASE` returns `inst/home/rel/db` because
`FilePathOption.get` prepends `self.config["HOME"]`.  In the original
implementation, `tracker_home` is passed to `write_select_db` as
`instance_home`, and then prepended to `dbdir`, so you get duplicate
home values.

This is not a problem when either the configured `database` path or
`tracker_home` are absolute, because then the value returned by
`tracker.config.DATABASE` will be absolute, and the additional
`os.path.join` prepend in `write_select_db` has no effect.
Files
File name Uploaded
avoid-duplicate-relative-tracker-homes-when-reinitialising.patch wking, 2012-05-15.18:11:58
History
Date User Action Args
2012-05-15 18:11:59wkingsetrecipients: + wking
2012-05-15 18:11:59wkinglinkissue2550757 messages
2012-05-15 18:11:59wkingcreate