#10 diffuserc / syntax: path only works for certain installs

Moritz Barsnick

the path to the syntax files as given in the default diffuserc (src/etc/diffuserc) only works for certain installations.

I assume the relative path syntax, such as
relates to the location of diffuserc itself? Then this particular path only works when diffuserc is in /etc/, and the rest in /usr/share/diffuse/.

If I happen to install diffuse into a dedicated directory tree, such as /path/to/diffuse/, and place diffuserc into /path/to/diffuse/etc/diffuserc, that path needs to read:

Actually, this path should probably be adapted by install.py, since it knows best where the syntax files land at installation.

BTW, my install.py call is approximately as such:
(PREFIX=/site/tools/diffuse/0.4.6; ./install.py --destdir=/tmp/install_root --prefix=$PREFIX --sysconfdir=$PREFIX/etc --examplesdir=$PREFIX/share/diffuse/examples --pythonbin=/usr/bin/python2.7.2 --files-only)
and $PREFIX/etc doesn't even get created.


  • Derrick Moser
    Derrick Moser

    I am not able to reproduce this bug.

    I suspect there is some confusion about the "--examplesdir" parameter. Some platforms (eg. NetBSD if I recall correctly) don't like installers copying configuration files to places where users may have made manual edits. The "--examplesdir" switch is intended for these use cases and some other process is expected to complete the configuration. I suspect you don't want this behaviour so you should omit the "--examplesdir" switch.

    Diffuse uses relative paths when referring to support files. The paths in the "diffuserc" file are relative the "diffuserc" file itself (not the "diffuse" executable). The installer should update the relative paths in the installed files if you specify different values for the "--prefix" and "--sysconfdir" switches. I do see the path correctly updated to "../share/diffuse/syntax/*.syntax" when I run the installer with the command line you provided. Are you seeing different behaviour?

    $PREFIX/etc is not created as some other process is expected to do that when the "--examplesdir" switch is given.