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

Bug #152438 reported by Michael R. Head on 2007-10-13
Affects Status Importance Assigned to Milestone
viewvc (Debian)
Fix Released
viewvc (Ubuntu)
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/", line 3628, in main
  File "/usr/lib/viewvc/", line 387, in run_viewvc
  File "/usr/lib/viewvc/", line 1509, in view_roots
    generate_page(request, "roots", data)
  File "/usr/lib/viewvc/", line 835, in generate_page
    template = get_view_template(request.cfg, view_name, request.language)
  File "/usr/lib/viewvc/", line 829, in get_view_template
    template = ezt.Template(tname)
  File "/usr/lib/viewvc/", line 293, in __init__
    self.parse_file(fname, base_format)
  File "/usr/lib/viewvc/", line 298, in parse_file
    self.parse(_FileReader(fname), base_format)
  File "/usr/lib/viewvc/", line 686, in __init__
    self.text = open(fname, 'rb').read()
IOError: [Errno 2] No such file or directory: '/usr/lib/templates/roots.ezt'

Michael R. Head (burner) wrote : has _install_path, which returns /usr/lib/templates/roots.ezt for the file templates/roots.ezt because it looks up the parent dir of, which is /usr/lib and appends templates/roots.ezt to it.

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
Johan Euphrosine (proppy) wrote :

Debian provide a patch that need to be tested:

Johan Euphrosine (proppy) wrote :

I've successfully reproduce it on:
Using the following procedure:

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

Johan Euphrosine (proppy) wrote :

Can you try to apply the following modification to your /etc/viewvc/viewvc.conf after upgrading:
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
Johan Euphrosine (proppy) wrote :

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

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.

Michael R. Head (burner) wrote :

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

Michael R. Head (burner) wrote :

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

Changed in viewvc:
status: Incomplete → Confirmed
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) on 2010-06-08
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  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.