Bug#402994: use new libpaper hook to track system paper size
Frank Küster <frank@debian.org> wrote:
> Or wait. We could
>
> - ship our default config.ps in /usr/share/tetex-bin
>
> - in postinst, run the equivalent of the libpaper hook on this file,
> creating a temporary file which differs from the default one only by
> the papersize setting
>
> - use ucf to install the temporary file in /etc/texmf/dvips/
To put a little flesh on this:
- paperconfig/libpaper.postinst call the hook without parameters
- TeX packages' postinsts call it with option "packagename"
and the script does the following (example only for dvips)
if [ -n "$1" ]; then
sourcedir=/usr/share/$1
else
sourcedir=/etc/texmf/dvips
fi
papersize=`ask libpaper`
case $papersize in
list|of|known|papers)
:
;;
*)
error_message #debconf or stderr?
exit 0
esac
sed -e 's/\($pattern_for_papersize\)[anysize]*/\1 $papersize/ \
$sourcdir/config.ps > tempfile
ucf tempfile /etc/texmf/dvips/config.ps
Regards, Frank
--
Dr. Frank Küster
Single Molecule Spectroscopy, Protein Folding @ Inst. f. Biochemie, Univ. Zürich
Debian Developer (teTeX/TeXLive)
Reply to: