Re: SVN texlive (new) commit: r2454 - in texlive-new/trunk: . all/debian
On Mit, 14 Feb 2007, Frank Küster wrote:
> Norbert Preining <preining@alioth.debian.org> wrote:
>
> > * Expand infrastructure to allow automatic generation of preinst
> > code for config files. Config files are marked in the tpm2deb.cfg
> > via a mapping;origdist;config-{copy,link};dest directive and
> > in the preinst script of the respective package a line
> > handle_config_file $configfile
> > is added. Currently prefixed with a :, as the function has to be
> > written [NP]
>
> Thank you! But shouldn't the name of the function reflect that it is
> only needed for the conffiles that we move around, not for possible new
> ones? And shouldn't the moves be reverted in the failed-upgrade
> branches of (either) postrm or prerm?
Yes yes yes. I didn't have time to make everything polished, I only
wanted to get something done.
Concerning new/old config files: You are right, but this can be done
trivially ... in fact just done: I added a new directive "copy" (for the
mapping lines) which just copies without generating anything for the
maintainer scripts, and adapted the tpm2deb.cfg file:
mapping;texmf[^/]*/dvipdfm/config/config;config-link;/etc/texmf/dvipdfm/dvipdfm.cfg
mapping;texmf[^/]*/xdvi/xdvi.cfg;config-link;/etc/texmf/xdvi/xdvi.cfg
mapping;texmf[^/]*/xdvi/XDvi;config-link;/etc/temxf/xdvi/XDvi
mapping;texmf[^/]*/texdoctk/texdocrc.defaults;config-link;/etc/texmf/texdoctk/texdocrc.defaults
mapping;texmf[^/]*/texdoctk/texdocrc.dat;config-link;/etc/texmf/texdoctk/texdocrc.dat
mapping;texmf[^/]*/metafont/misc/modes.mf;config-copy;/etc/texmf
#
# files found via kpse are just copied to /etc/texmf, directive
# configfile
mapping;texmf[^/]*/dvips/config/([^/]*);config-copy;/etc/texmf
# new config files, ie those which have not been config files till now
# and don't need special treatment
mapping;texmf[^/]*/tex/generic/config/pdftexconfig.tex;copy;/etc/texmf
mapping;texmf[^/]*/tex/latex/pict2e/pict2e.cfg;copy;/etc/texmf
mapping;texmf[^/]*/tex/latex/contour/contour.cfg;copy;/etc/texmf
mapping;texmf[^/]*/tex/latex/config/color.cfg;copy;/etc/texmf
mapping;texmf[^/]*/tex/latex/config/graphics.cfg;copy;/etc/texmf
mapping;texmf[^/]*/tex/latex/config/hyperref.cfg;copy;/etc/texmf
For modes.mf above I am not sure ...
Now the rest should be done in the handle_config_file function a la
case $cfgfile in
old file1) ...
old file2) ...
...
esac
And concerning prerm/postrm, should I add the
: handle_config_file_prerm/postrm/preinst/postinst $cfgfile
to all the 4 maintainer scripts? Any suggestions? It is a trivial
change.
Best wishes
Norbert
-------------------------------------------------------------------------------
Dr. Norbert Preining <preining@logic.at> Università di Siena
Debian Developer <preining@debian.org> Debian TeX Group
gpg DSA: 0x09C5B094 fp: 14DF 2E6C 0307 BE6D AD76 A9C0 D2BF 4AA3 09C5 B094
-------------------------------------------------------------------------------
PERRANZABULOE (n.)
One of those spray things used to wet ironing with.
--- Douglas Adams, The Meaning of Liff
Reply to: