[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Regarding #563460 (texdoc.cnf location)



Dear Debian Tex maintainers,

I happened to look again at #563460 recently, and think a bit further about it.

As I explained to Norbert, I don't want to change the location of configuration
files looked at in the upstream version of texdoc, because:
1. if texdoc stops looking at the files in the current location, it will break
existing installations;
2. if I merely add new locations to be searched, I'm afraid the system will get
too confusing with so many config files possibly read.

OTOH, I understand your concern that config files should be under /etc in
Debian, since that's the kind of details I appreciate as a Debian user :-)
Moreover, in upstream TeX Live texdoc reads platform-specific configuration
files that do not make sense with de Debian installation. Also, if the main
configuration file can be edited by the local admin, I see no need for an
additional system-wide file in TEXMFLOCAL.

So, I suggest patching texdoc is indeed the way to go here, since it makes sense
to change the list of files used quite extensively. Fortunately, it is easy to
do. (More precisely, it was almost easy until yesterday, and became really easy
since I made the last hard-coded bit configurable and adapted the documentation
in texdoc 0.65.) It is only a matter of replacing the get_config_files()
function in config.tlu by a more appropriate version. I suggest:

-- return the list of configuration files and the index of the recommended file
function get_config_files ()
    local TEXMFHOME  = kpse.var_value ('TEXMFHOME')
    local TEXMFSYSCONFIG  = kpse.var_value ('TEXMFSYSCONFIG')
    return {
        TEXMFHOME       .. '/texdoc/texdoc.cnf',
        TEXMFHOME       .. '/texdoc/texdoc-dist.cnf',
        TEXMFSYSCONFIG  .. '/texdoc/texdoc.cnf'
    }, 1
end

The additional return value (1) is used by the --files option to highlight the
preferred file for user settings. You can also use TEXMFCONFIG instead of
TEXMFHOME if you think it's better, but I think it will be less confusing to
users if the location is the same regardless of the origin (Debian or upstream)
of their TeX Live installation.


I hope you'll find this solution satisfactory, and I'm open to discussion otherwise.

Best,
Manuel.


Reply to: