ViewVC doesn't work after dist-upgrade from viewcvs in feisty

Bug #152438 reported by Michael R. Head
8
Affects Status Importance Assigned to Milestone
viewvc (Debian)
Fix Released
Unknown
viewvc (Ubuntu)
Confirmed
Medium
Johan Euphrosine

Bug Description

Binary package hint: viewvc

I'm getting this after a direct upgrade:
An Exception Has Occurred
Python Traceback

Traceback (most recent call last):
  File "/usr/lib/viewvc/viewvc.py", line 3628, in main
    request.run_viewvc()
  File "/usr/lib/viewvc/viewvc.py", line 387, in run_viewvc
    self.view_func(self)
  File "/usr/lib/viewvc/viewvc.py", line 1509, in view_roots
    generate_page(request, "roots", data)
  File "/usr/lib/viewvc/viewvc.py", line 835, in generate_page
    template = get_view_template(request.cfg, view_name, request.language)
  File "/usr/lib/viewvc/viewvc.py", line 829, in get_view_template
    template = ezt.Template(tname)
  File "/usr/lib/viewvc/ezt.py", line 293, in __init__
    self.parse_file(fname, base_format)
  File "/usr/lib/viewvc/ezt.py", line 298, in parse_file
    self.parse(_FileReader(fname), base_format)
  File "/usr/lib/viewvc/ezt.py", line 686, in __init__
    self.text = open(fname, 'rb').read()
IOError: [Errno 2] No such file or directory: '/usr/lib/templates/roots.ezt'

Revision history for this message
Michael R. Head (burner) wrote :

viewvc.py has _install_path, which returns /usr/lib/templates/roots.ezt for the file templates/roots.ezt because it looks up the parent dir of viewvc.py, which is /usr/lib and appends templates/roots.ezt to it.

Revision history for this message
Michael R. Head (burner) wrote :

BTW, on my debian/sid server, I had to manually make a symlink from /usr/lib/templates to /etc/viewvc/templates (same should work here).

Changed in viewvc:
importance: Undecided → Medium
status: New → Confirmed
Changed in viewvc:
status: Unknown → Incomplete
Revision history for this message
Johan Euphrosine (proppy) wrote :

Debian provide a patch that need to be tested:
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=409864#88

Revision history for this message
Johan Euphrosine (proppy) wrote :

I've successfully reproduce it on:
http://lp152438.aminche.com/cgi-bin/viewvc.cgi/
Using the following procedure:
http://lp152438.aminche.com/

Revision history for this message
Johan Euphrosine (proppy) wrote :

Applying the following patch to /etc/viewvc/viewvc.conf after the dist-upgrade fix the issue
I generated the patch by diffing the feisty-upgraded-to-gutsy /etc/viewvc/viewvc.conf and the gutsy-installed one
I believe this is a configuration files migration/update bug

Revision history for this message
Johan Euphrosine (proppy) wrote :

Can you try to apply the following modification to your /etc/viewvc/viewvc.conf after upgrading:
add
template_dir = /etc/viewvc/templates
in [options] section
comment all options
in [templates] section

And report if you still get the same error or not.

Thanks in advance

Changed in viewvc:
assignee: nobody → proppy
status: Confirmed → Incomplete
Revision history for this message
Johan Euphrosine (proppy) wrote :

Can you attach /etc/viewvc/viewvc.conf file just after the dist-upgrade too ?

Revision history for this message
Michael R. Head (burner) wrote :

Well, it's a little late to attach the file after the dist-upgrade, but I can attach what I've got now.

Revision history for this message
Michael R. Head (burner) wrote :

I tried your conf-file fix, and it seems to work.

Revision history for this message
Michael R. Head (burner) wrote :

(it even worked after doing a sudo rm /usr/lib/templates )

Changed in viewvc:
status: Incomplete → Confirmed
Revision history for this message
Johan Euphrosine (proppy) wrote :

The attached script automates this workaround:
- add the template_dir option
- comment all the template option in templates section.

David Futcher (bobbo)
tags: added: patch-forwarded-debian
Changed in viewvc (Debian):
status: Incomplete → Fix Released
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.