On 9/02/2007, at 3:04 PM, David Martínez Moreno wrote:
El viernes, 9 de febrero de 2007 00:40, Nick Phillips escribió:
OK, well take a look at line 761 in viewvc.py and it being called
from line 827, and laugh. Consider for a moment the explicitly-set
relative template paths in the viewvc.conf that has been generated
for you. Consider further the absolute futility of setting the
template_dir option.
Only if it is relative, not absolute. There is a:
if os.path.isabs(path):
that should take care of giving back the path unaltered if it is
absolute,
which is our case.
Not if the individual template settings are relative, which in my
migrated config (from a standard viewcvs config), they are.
i.e. template_dir is set and absolute, individual template names are
set and relative, and the result is breakage.
Maybe I am completely slept or something, but the viewvc.conf from
Rodrigo
only has the default configuration, that is, an absolute template_dir
parameter and no explicit template. I do not see your point, sorry.
I'm guessing I'm not the only one who is using this as a migration
from viewcvs. In any case, irrespective of the config file that we
may or may not ship/create, the behaviour that viewvc exhibits when a
relative template name is set is nuts.
I would suggest that:
* If absolute template paths are explicitly set per-template, they
are used
* If relative templates (which include the defaults) are to be used,
then they should be relative to the specified template_dir
* If relative templates are to be used, and template_dir is not set,
then they should be relative to /etc/viewvc -- not the result of some
half-baked attempt to find some kind of "installation dir".
Note that _install_path appears also to be used e.g. to determine
where to tell cvsgraph to look for config files. Which is also crazy
and broken.
Please don't misinterpret my previous comments as criticism of you as
maintainer -- whoever wrote the code evidently just completely failed
to consider setups different to their own.
Cheers,
Nick
--
Nick Phillips / +64 3 479 4195 / [EMAIL PROTECTED]
# these statements are my own, not those of the University of Otago