#!/bin/sh -e
# 
# config maintainer script for the Debian tex-common package.
#
# Copyright (C) 2004 by Frank Küster <frank@kuesterei.ch>. 
# Copyright (C) 2012 by Norbert Preining <preining@debian.org>.
#
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the
# Free Software Foundation; either version 2 of the License, or (at your
# option) any later version.
#
# This file is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License along
# with this program; if not, write to: The Free Software Foundation, Inc.,
# 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
#
# On Debian GNU/Linux System you can find a copy of the GNU General Public
# License in "/usr/share/common-licenses/GPL".

# Give names to the commandline arguments
action=$1
installed_version=$2

. /usr/share/debconf/confmodule
db_version 2.0

## do the things we have to do for upgraders from old versions
# it does not harm to do the checks also when $action is reconfigure.

# we also unregister the tetex-bin/lsr-perms
db_unregister tetex-bin/lsr-perms || true

# and unregister old tex-common questions, they are not needed anymore
db_unregister tex-common/groupperm || true
db_unregister tex-common/userperm || true
db_unregister tex-common/managedlsr || true
db_unregister tex-common/cnf_name || true

# now we can also unregister the managecache questions
db_unregister tex-common/groupname || true
db_unregister tex-common/groupname_single || true
db_unregister tex-common/groupname_multi || true
db_unregister tex-common/managecache || true
db_unregister tex-common/invalid_groupname || true
db_unregister tex-common/warn_mktexcnf || true

# test whether mktex.cnf exists in TEXMFSYSCONFIG and warn the user
# mktex.cnf in TEXMFCONFIG will have the same effect, but all we can provide
# in this case is the message in NEWS.Debian
#
# disabled, we ship mktex.cnf again in /etc/texmf/web2c/, see bug 379089
# if [ -f /etc/texmf/web2c/mktex.cnf ]; then
#   db_input medium tex-common/warn_mktexcnf || true
#   db_go
# fi


# Local Variables:
# mode: shell-script
# skeleton-pair: t
# End:

