Roundup Tracker - Issues

Issue 2551029

classification
Title: Jinja2 template install error
Type: Severity: minor
Components: Installation Versions: devel, 1.6
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: rouilj Nosy List: ber, tekberg, tmikk
Priority: Keywords:

Created on 2019-03-12 16:11 by tmikk, last changed 2019-03-13 16:48 by ber.

Messages
msg6384 Author: [hidden] (tmikk) Date: 2019-03-12 16:11
When choosing Jinja2 as the template and sqlite as the database 
during the tracker creation (roundup-admin install), the resulting 
config.ini file does not include the database backend declaration.  
As the user tries to initialize the tracker (roundup-admin 
initialize), they get an error:  

  File "/usr/bin/roundup-admin", line 3, in <module>
    run()
  File "/usr/lib/python2.7/site-
packages/roundup/scripts/roundup_admin.py", line 49, in run
    sys.exit(tool.main())
  File "/usr/lib/python2.7/site-packages/roundup/admin.py", line 
1635, in main
    ret = self.run_command(args)
  File "/usr/lib/python2.7/site-packages/roundup/admin.py", line 
1504, in run_command
    return self.do_initialise(self.tracker_home, args)
  File "/usr/lib/python2.7/site-packages/roundup/admin.py", line 
526, in do_initialise
    tracker = roundup.instance.open(tracker_home)
  File "/usr/lib/python2.7/site-packages/roundup/instance.py", line 
327, in open
    return Tracker(tracker_home, optimize=optimize)
  File "/usr/lib/python2.7/site-packages/roundup/instance.py", line 
92, in __init__
    self.backend = backends.get_backend(rdbms_backend)
  File "/usr/lib/python2.7/site-
packages/roundup/backends/__init__.py", line 42, in get_backend
    module = __import__(module_name, vars)
ImportError: No module named back_

The error goes away after adding the line to the tracker's 
config.ini:
# Database backend.
# Default:
backend = sqlite
msg6385 Author: [hidden] (tekberg) Date: 2019-03-12 17:02
The change is in the [rdbms] section.
Files affected in share/roundup/templates:
  devel/config.ini
  jinja2/config.ini
  responsive/config.ini
These have no config.ini
  classic/
  minimal/
Perhaps they should.

Recall that in roundup 1.5, and perhaps 1.6, the specification of the
database type was in the tracker's db/ directory in the file
backend_name. It was decided that it makes more sense to make it the
config parameter rdbms.backend. Changes to these config.ini files will
complete that change.
msg6388 Author: [hidden] (ber) Date: 2019-03-13 16:18
Trying to find a simple way to reproduce
and I could verify the problem.

Testing with rev:095db27e80644a2a547f6e66a58207981352323d 2019-03-13

== Reproduction with demo.py failed
python3  ./demo.py -t jinja2 -b sqlite nuke
# and python2

worked and had 
# Database backend.
# Default:
backend = sqlite
in ./demo/config.ini

== Reproduction with install
mkdir test-install/
cd roundup-hq
python3 setup.py install --prefix=../test-install
# setting PATH and PYTHONPATH with fishshell
set -l base /home/bern/roundup/test-install
set PATH $base/bin $PATH
set PYTHONPATH $base/test-install/lib/python3.5/site-packages/:$PYTHONPATH

mkdir test-tracker
roundup-admin -i test-tracker install jinja2 sqlite
roundup-admin -i test-tracker initialise 1234
msg6389 Author: [hidden] (ber) Date: 2019-03-13 16:39
hg:095db27e80644a2a547f6e66a58207981352323d 2019-03-10 maint-1.6
has the same problem.
msg6390 Author: [hidden] (ber) Date: 2019-03-13 16:46
hg bisec between maint-1.6 and 1.5.1 results in

The first bad revision is:
changeset:   5041:5251e97b1de0
user:        John Kristensen <john@jerrykan.com>
date:        Mon Dec 22 13:30:20 2014 +1100
summary:     Configure the database backend in the config.ini
msg6391 Author: [hidden] (ber) Date: 2019-03-13 16:48
John,
seems your change towards 1.6.0 broke the roundup-admin initalise
command. >:)
History
Date User Action Args
2019-03-13 16:48:51bersetassignee: rouilj
messages: + msg6391
2019-03-13 16:46:32bersetmessages: + msg6390
2019-03-13 16:39:23bersetmessages: + msg6389
2019-03-13 16:18:10bersetstatus: new -> open
nosy: + ber
messages: + msg6388
versions: + devel
2019-03-12 17:02:08tekbergsetnosy: + tekberg
messages: + msg6385
2019-03-12 16:11:27tmikkcreate