Bug#769526: xlshlt: xslhlt should use configuration file provided by package by default

Niels Thykier niels at thykier.net
Sun Nov 16 10:04:51 UTC 2014


On 2014-11-16 10:54, Eugene Zhukov wrote:
> Hi and thank you for your bug report! I examined the patch and have a
> question about it.
> What is the purpose of "} else if (new
> File("xslthl-config.xml").isFile()) {"? As far as I understand it will
> always be true. What did I miss?
> 
> I would only change
> configFilename = "xslthl-config.xml";
> to
> configFilename = "/usr/share/xslthl/highlighters/xslthl-config.xml";
> 
> __
> This is the maintainer address of Debian's Java team
> <http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-java-maintainers>. Please use
> debian-java at lists.debian.org for discussions and questions.
> 

Hi,

I suppose the purpose of the "} else if(new File(...)" is to keep the
current behaviour of using "./xslthl-config.xml" if it exists (in
preference to the global one).

On a related note, if xslthl-config.xml is a file that the end user
might want to change (i.e. it contains configuration), then the Debian
package should look for it in /etc (possibly falling back to the
/usr/share one if the /etc variant does not exist).

~Niels

Ref: https://www.debian.org/doc/debian-policy/ch-files.html#s-config-files



More information about the pkg-java-maintainers mailing list