ports/142460: [PATCH] devel/viewvc Assertion error in standalone http server

Rob Farmer rfarmer at predatorlabs.net
Fri Jan 8 06:00:10 UTC 2010


>Number:         142460
>Category:       ports
>Synopsis:       [PATCH] devel/viewvc Assertion error in standalone http server
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Jan 08 06:00:09 UTC 2010
>Closed-Date:
>Last-Modified:
>Originator:     Rob Farmer
>Release:        9.0-CURRENT
>Organization:
>Environment:
FreeBSD peridot.predatorlabs.net 9.0-CURRENT FreeBSD 9.0-CURRENT #0 r201657: Wed Jan 6 09:49:06 PST 2010 robert at peridot.predatorlabs.net:/usr/obj/usr/src/sys/PERIDOT i386
>Description:
Try to set up ViewVC on a CVS repository with the standalone http server:

An Exception Has Occurred
Python Traceback

Traceback (most recent call last):
 File "/usr/local/viewvc/lib/viewvc.py", line 4315, in main
   request.run_viewvc()
 File "/usr/local/viewvc/lib/viewvc.py", line 398, in run_viewvc
   self.view_func(self)
 File "/usr/local/viewvc/lib/viewvc.py", line 1838, in view_roots
   allroots = list_roots(request)
 File "/usr/local/viewvc/lib/viewvc.py", line 4180, in list_roots
   auth = setup_authorizer(cfg, request.username, root)
 File "/usr/local/viewvc/lib/viewvc.py", line 805, in setup_authorizer
   authorizer, params = cfg.get_authorizer_and_params_hack(rootname)
 File "/usr/local/viewvc/lib/config.py", line 314, in
get_authorizer_and_params_hack
   assert(self.root_options_overlayed == 0)
AssertionError

This is ViewVC issue 445 <http://viewvc.tigris.org/issues/show_bug.cgi?id=445>

>How-To-Repeat:

>Fix:
Apply attached patch by C. Michael Pilato <cmpilato at tigris.org>

Patch attached with submission follows:

diff -ruN viewvc.old/Makefile viewvc/Makefile
--- viewvc.old/Makefile	2010-01-07 10:41:02.000000000 -0800
+++ viewvc/Makefile	2010-01-07 10:46:29.000000000 -0800
@@ -7,6 +7,7 @@
 
 PORTNAME=	viewvc
 PORTVERSION=	1.1.3
+PORTREVISION=	1
 CATEGORIES=	devel python
 MASTER_SITES=	http://viewvc.tigris.org/files/documents/3330/47194/
 
diff -ruN viewvc.old/files/patch-lib-config.py viewvc/files/patch-lib-config.py
--- viewvc.old/files/patch-lib-config.py	1969-12-31 16:00:00.000000000 -0800
+++ viewvc/files/patch-lib-config.py	2010-01-07 10:45:57.000000000 -0800
@@ -0,0 +1,31 @@
+--- lib/config.py.orig	2010-01-07 10:44:45.000000000 -0800
++++ lib/config.py	2010-01-07 10:44:50.000000000 -0800
+@@ -274,9 +274,7 @@
+     """Overlay per-root options for ROOTNAME atop the existing option
+     set.  This is a destructive change to the configuration."""
+ 
+-    # We can only deal with this happening once!
+-    assert(self.root_options_overlayed == 0)
+-    self.root_options_overlayed = 1
++    did_overlay = 0
+     
+     if not self.conf_path:
+       return
+@@ -285,7 +283,17 @@
+       base_section = self._is_allowed_override(self.parser, 'root',
+                                                rootname, section)
+       if base_section:
++        # We can currently only deal with root overlays happening
++        # once, so check that we've not yet done any overlaying of
++        # per-root options.
++        assert(self.root_options_overlayed == 0)
+         self._process_section(self.parser, section, base_section)
++        did_overlay = 1
++
++    # If we actually did any overlaying, remember this fact so we
++    # don't do it again later.
++    if did_overlay:
++      self.root_options_overlayed = 1
+ 
+   def _get_parser_items(self, parser, section):
+     """Basically implement ConfigParser.items() for pre-Python-2.3 versions."""


>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list