[subversion-commit] SVN tetex commit + diffs: r377 -
tetex-base/trunk/debian
Frank Küster
frank at costa.debian.org
Tue Dec 6 12:42:52 UTC 2005
Author: frank
Date: 2005-12-06 12:42:51 +0000 (Tue, 06 Dec 2005)
New Revision: 377
Modified:
tetex-base/trunk/debian/common.variables
tetex-base/trunk/debian/postinst.functions
tetex-base/trunk/debian/postinst.in
tetex-base/trunk/debian/postrm.functions
tetex-base/trunk/debian/postrm.in
tetex-base/trunk/debian/preinst.in
tetex-base/trunk/debian/variables
Log:
a first try for tetex-base's conffile removal; probably full of syntax errors. Also removed unused functions.
Modified: tetex-base/trunk/debian/common.variables
===================================================================
--- tetex-base/trunk/debian/common.variables 2005-12-06 09:25:21 UTC (rev 376)
+++ tetex-base/trunk/debian/common.variables 2005-12-06 12:42:51 UTC (rev 377)
@@ -25,8 +25,8 @@
<:$TEXMF_PARTS="05TeXMF 15Plain 45TeXinputs 55Fonts 65BibTeX 75DviPS 85Misc 90TeXDoc 95NonPath":>//
<:for (@TEXMF_PARTS_FULLNAME=split(/ /,$TEXMF_PARTS)){s{(.*)}{texmf.d/$1.cnf}}:>//
<:$TEX_COMMON_UCF_FILES="@TEXMF_PARTS_FULLNAME updmap.d/00updmap.cfg":>//
-<:$confstatedir="/var/lib/tetex":>//
-<:$no_config_prefix="admin-wants-no":>//
+# <:$confstatedir="/var/lib/tetex":>//
+# <:$no_config_prefix="admin-wants-no":>//
<:$LSRS="/var/lib/texmf/ls-R /var/lib/texmf/ls-R-TEXMFMAIN /var/lib/texmf/ls-R-LOCAL /var/cache/fonts/ls-R":>//
<:# get the package version - must be usable in subdirectories, too:>//)
<:if(-f "changelog"){open(CHANGELOG,"changelog")} else {open(CHANGELOG, "../changelog")};
Modified: tetex-base/trunk/debian/postinst.functions
===================================================================
--- tetex-base/trunk/debian/postinst.functions 2005-12-06 09:25:21 UTC (rev 376)
+++ tetex-base/trunk/debian/postinst.functions 2005-12-06 12:42:51 UTC (rev 377)
@@ -2,6 +2,8 @@
## Function definitions - included from file postinst.functions
#################################################################
+# common.functions need to be included also!
+
# for pdftexconfig_transition()
# args: 1. command to change/add, 2. setting
ConfigReplace(){
@@ -36,7 +38,7 @@
# only act if the old file is there, and the new one not yet:
test -f $oldfile && test ! -f $newfile || return 0
# also stop if the old file is unchanged
- dpkg_md5sum=`grep $oldfile /var/lib/dpkg/status | cut -f 3 -d ' '`
+ dpkg_md5sum=`dpkg_md5sum $oldfile`
actual_md5sum=`md5sum $oldfile | cut -f 1 -d ' '`
test "$dpkg_md5sum" != "$actual_md5sum" || return 0
@@ -84,45 +86,6 @@
echo "done."
}
-check_ini_md5sum(){
- set "$@"
-
- while [ $# -gt 0 ]; do
- oldmd5sum=$1
- file=$2
- shift 2
-
- test -f $file || continue
- newmd5sum=`md5sum $file | cut -d ' ' -f 1`
- if [ "$newmd5sum" = "$oldmd5sum" ]; then
- echo "Removing obsolete, unchanged conffile $file"
- rm $file
- else
- echo "Moving obsolete, locally changed conffile $file to $OLDSTUFFDIR"
- test -d $OLDSTUFFDIR || mkdir $OLDSTUFFDIR
- mv $file $OLDSTUFFDIR/
- fi
- done
- # remove if now empty
- for dir in $REMOVE_DIRS; do
- test -d /etc/texmf/$dir && \
- rmdir --ignore-fail-on-non-empty /etc/texmf/$dir || true
- done
- # add a comment file
- if [ -d $OLDSTUFFDIR ]; then
- cat > $OLDSTUFFDIR/README <<EOF
-Files in this directory used to be conffiles, but are obsolete and unused now.
-Some *.ini files gathered here are still used, but they are no longer treated
-as conffiles, because they should not be changed. Instead, use copies with a
-different name.
-
-If you do no longer need your local changes, this directory and its contents
-should be deleted.
-EOF
- fi
-
-}
-
#################################################################
## End of function definitions from file postinst.functions
#################################################################
Modified: tetex-base/trunk/debian/postinst.in
===================================================================
--- tetex-base/trunk/debian/postinst.in 2005-12-06 09:25:21 UTC (rev 376)
+++ tetex-base/trunk/debian/postinst.in 2005-12-06 12:42:51 UTC (rev 377)
@@ -3,6 +3,8 @@
#
# postinst maintainer script for the Debian tetex-base package.
# $Id$
+# don't try to understand th generated script as installed with the package.
+# instead, look at the source files in the source package
<:=@COPYRIGHT:>//
## Define static variables we need
@@ -18,22 +20,11 @@
## Variables needed for upgrading
obsolete_dirs="/usr/lib/texmf/local, /usr/share/texmf/local"
POSTINST_MOVE_EXT="<:=$POSTINST_MOVE_EXT:>"
+PREINST_MOVE_EXT=<:=$PREINST_MOVE_EXT:>
OLD_LDAT=$etc/language.dat
-md5sumlist="
-09e4f410ade0befce1e0bacf8e272789 /etc/texmf/latex/latex.ini
-40ae6def8399827a80f3736e5fb1cdf5 /etc/texmf/cyrplain/cyrtex.ini
-797f2dae2d06396a4b40b1454609f025 /etc/texmf/cyrplain/cyrtxinf.ini
-15d4ba30419b36376851a124619e20ba /etc/texmf/cyrplain/cyramstx.ini
-eb7eeca34d4f7c338480ae2f1e95dae6 /etc/texmf/etex/etex.ini
-c865212575be3a09cbadb694a803ca55 /etc/texmf/platex/platex.ini
-c2c75aaddf59e7cd1d14ef3661578eef /etc/texmf/context/cont-de.ini
-5d7064e3adc9acdaf94e37e9bc5c1a29 /etc/texmf/context/cont-en.ini
-96366065e347eab53a30e72d9a6e4ca0 /etc/texmf/context/cont-it.ini
-25cbcc11164d749693de4eea197a9c65 /etc/texmf/context/cont-nl.ini
-a94fd43e68156f57e6bf3ac4a901af14 /etc/texmf/context/cont-ro.ini
-ee6f13cd52623786f7a13c151900ec50 /etc/texmf/context/cont-uk.ini
-984f5ed1242258775b9c6e5e8b219a26 /etc/texmf/context/cont-cz.ini
-"
+
+UNUSED_CONFFILES="<:=$UNUSED_CONFFILES_BASE:>"
+
REMOVE_DIRS=etex
OLDSTUFFDIR=<:=$OLDSTUFFDIR:>
@@ -81,9 +72,6 @@
pdftexconfig_transition
- # remove ini files that are no longer treated as conffiles, but only if unchanged
- check_ini_md5sum $md5sumlist
-
;;
esac
@@ -91,15 +79,11 @@
case "$1" in
configure)
-# rename unused conffiles. This must be done after moving (in
-# preinst), because some are first moved with their "cousins" to the
-# new directories. If there were no changes in these files, they have
-# been removed by dpkg
- for conffile in $UNUSED_CONFFILES; do
- test -f /etc/texmf/$conffile && mv /etc/texmf/$conffile /etc/texmf/$conffile.$POSTINST_MOVE_EXT || true
+ # remove backup files from preinst
+ for file in $UNUSED_CONFFILES; do
+ rm -f /etc/texmf/$file.$PREINST_MOVE_EXT
done
-
# Update language.dat (update-language is in tex-common on which we depend)
update-language
Modified: tetex-base/trunk/debian/postrm.functions
===================================================================
--- tetex-base/trunk/debian/postrm.functions 2005-12-06 09:25:21 UTC (rev 376)
+++ tetex-base/trunk/debian/postrm.functions 2005-12-06 12:42:51 UTC (rev 377)
@@ -1,7 +1,7 @@
#################################################################
# Function definitions included from file postrm.functions
#################################################################
-# $Id: postrm.functions,v 1.1.2.3 2005/02/23 18:59:24 frank Exp $
+# $Id$
# Copyright 2004 Frank Küster <frank at debian.org>
remove_with_backups(){
@@ -58,32 +58,4 @@
fi
}
-remove_statedir_maybe(){
- # the function can be called upon remove and purge; upon purge the
- # directory might yet be removed
- if [ ! -d $CONFSTATEDIR ]; then return 0; fi
- # check whether there are files from other packages in the confstatedir
- numfiles=`ls -1 $CONFSTATEDIR | wc -l`
- case $numfiles in
- 0)
- # something went wrong
- echo "$CONFSTATEDIR/README has been deleted. This should not be the case!" >&2
- rmdir $CONFSTATEDIR
- ;;
- 1)
- if [ -f $CONFSTATEDIR/README ]; then
- rm $CONFSTATEDIR/README
- rmdir $CONFSTATEDIR
- else
- echo "$CONFSTATEDIR/README has been deleted. Trying to restore" >&2
- cp /usr/share/tetex-base/README.texmaps $CONFSTATEDIR/README || true
- fi
- ;;
- 2)
- if [ ! -f $CONFSTATEDIR/README ]; then
- echo "$CONFSTATEDIR/README has been deleted. Trying to restore" >&2
- cp /usr/share/tetex-base/README.texmaps $CONFSTATEDIR/README || true
- fi
- esac
-}
Modified: tetex-base/trunk/debian/postrm.in
===================================================================
--- tetex-base/trunk/debian/postrm.in 2005-12-06 09:25:21 UTC (rev 376)
+++ tetex-base/trunk/debian/postrm.in 2005-12-06 12:42:51 UTC (rev 377)
@@ -3,13 +3,18 @@
#
# postrm maintainer script for the Debian tetex-base package.
# $Id$
+#
+# don't try to understand this generated script as installed with the package.
+# instead, look at the source files in the source package
<:=@COPYRIGHT:>//
## Define static variables
-BASE_UCF_FILES="<:=$BASE_UCF:> /etc/texdoctk/texdocrc"
+BASE_UCF_FILES="/etc/texdoctk/texdocrc"
DPKG_EXT="<:=$PURGE_EXTENSIONS:>"
-CONFSTATEDIR=<:=$confstatedir:>
+UNUSED_CONFFILES="<:=$UNUSED_CONFFILES_BASE:>"
+PREINST_MOVE_EXT=<:=$PREINST_MOVE_EXT:>
+
## Variables needed for upgrading
generated="download35.map builtin35.map psfonts_t1.map psfonts_pk.map \
pdftex_dl14.map pdftex_ndl14.map dvipdfm_dl14.map dvipdfm_ndl14.map ps2pk.map"
@@ -17,11 +22,11 @@
#/var/lib/texmf has been removed from vardirlist - some files must be removed differently
vardirlist="/var/spool/texmf /var/cache/fonts"
old_texdoctk="<:=$OLD_TEXDOCTK:>"
-NOWLINKDIRS="<:=$NOWLINKDIRS:>"
-UNUSED_CONFFILES="<:=$UNUSED_CONFFILES_BASE:>"
-UNUSED_CONFDIRS="<:=$UNUSED_CONFDIRS_BASE:>"
+<:open(FUNCTIONS,'common.functions');@FUNCTIONS=<FUNCTIONS>;close(FUNCTIONS):>//
+<:=@FUNCTIONS:>//
+
<:open(FUNCTIONS,'postrm.functions');@FUNCTIONS=<FUNCTIONS>;close(FUNCTIONS):>//
<:=@FUNCTIONS:>//
@@ -60,15 +65,19 @@
done
ucf_purge $BASE_UCF_FILES
- # try to remove the statedir
- # remove_statedir_maybe
;;
abort-install|abort-upgrade)
- # we put the directories back that we moved out of the way.
- for dir in $NOWLINKDIRS; do
- if [ -d /usr/share/texmf/$dir.moved-by-preinst -a -L /usr/share/texmf/$dir ]; then
- rm /usr/share/texmf/$dir
- mv /usr/share/texmf/$dir.moved-by-preinst /usr/share/texmf/$dir
+ for file in $UNUSED_CONFFILES; do
+ debug $file
+ test -f "$file" || break
+ debug "handled\n"
+ if [ -e /etc/texmf/$file.$PREINST_MOVE_EXT ]; then
+ mv /etc/texmf/$file.$PREINST_MOVE_EXT /etc/texmf/$file
+ else
+ newname=`get_newfilename $file`
+ if [ -e /etc/texmf/$newname ]; then
+ mv /etc/texmf/$newname /etc/texmf/$file
+ fi
fi
done
Modified: tetex-base/trunk/debian/preinst.in
===================================================================
--- tetex-base/trunk/debian/preinst.in 2005-12-06 09:25:21 UTC (rev 376)
+++ tetex-base/trunk/debian/preinst.in 2005-12-06 12:42:51 UTC (rev 377)
@@ -3,52 +3,31 @@
#
# postinst maintainer script for the Debian tetex-base package.
# $Id$
+# don't try to understand this generated script as installed with the package.
+# instead, look at the source files in the source package
<:=@COPYRIGHT:>//
## Variables needed for upgrading
-NOWLINKDIRS="<:=$NOWLINKDIRS:>"
-NOWDIRLINKS="<:=$NOWDIRLINKS:>"
dvipdfmdef=/usr/share/texmf/tex/latex/graphics/dvipdfm.def
-MOVE_GENERIC_UCF="<:=$MOVE_GENERIC_UCF:>"
-MOVE_CONTEXT_NOUCF="<:=$MOVE_CONTEXT_NOUCF:> <:=$unused_contextmaps:>"
-MOVE_CONTEXT_UCF="<:=$MOVE_CONTEXT_UCF:>"
UNUSED_CONFFILES="<:=$UNUSED_CONFFILES_BASE:>"
-UPDMAP_CFG=/etc/texmf/updmap.d/10tetex-base.cfg
-UPDMAP_CFG_TRANSITION=/etc/texmf/updmap.d/00updmap.cfg_keep-for-tetex-base
+PREINST_MOVE_EXT=<:=$PREINST_MOVE_EXT:>
+# UPDMAP_CFG=/etc/texmf/updmap.d/10tetex-base.cfg
+# UPDMAP_CFG_TRANSITION=/etc/texmf/updmap.d/00updmap.cfg_keep-for-tetex-base
+
+
+
#################################################################
# Functions
#################################################################
-move_old_conffile () {
- oldname=$1
- newname=$2
- dontcomment=$3
- olddir=`dirname $oldname`
- newdir=`dirname $newname`
- if [ -f $oldname ]; then
- test -d $newdir || mkdir -p $newdir
- if [ -z $dontcomment ]; then
- cat > $newname <<EOF
-% This file has been renamed from
-% $oldname
-% by tetex-base's postinst script, in order to preserve your changes
-%
-EOF
- fi
- cat $oldname >> $newname
- chown --reference=$oldname $newname
- chmod --reference=$oldname $newname
- rm $oldname
- if rmdir $olddir 2>/dev/null; then
- echo "Removed obsolete dir $oldname."
- fi
- fi
-}
-
<:open(FUNCTIONS,'common.functions');@FUNCTIONS=<FUNCTIONS>;close(FUNCTIONS):>//
<:=@FUNCTIONS:>//
+#debug(){true "$*"}
+debug(){
+ echo -en "$*"
+}
#################################################################
# Here starts the real action
@@ -75,6 +54,22 @@
--divert ${dvipdfmdef}.tetex ${dvipdfmdef}
fi
+# remove obsolete conffiles if they are unchanged,
+# otherwise move them to the appropriate place
+ for file in $UNUSED_CONFFILES; do
+ debug $file
+ test -f "$file" || break
+ debug "handled\n"
+ oldmd5sum=`dpkg_md5sum $file`
+ currmd5sum=`md5sum /etc/texmf/$file | cut -d ' ' -f 1`
+ if [ "$oldmd5sum" = "$currmd5sum" ]; then
+ mv /etc/texmf/$file /etc/texmf/$file.$PREINST_MOVE_EXT
+ else
+ newname=`get_newfilename $file`
+ mv /etc/texmf/$file /etc/texmf/$newname
+ fi
+ done
+
;;
abort-upgrade)
:
Modified: tetex-base/trunk/debian/variables
===================================================================
--- tetex-base/trunk/debian/variables 2005-12-06 09:25:21 UTC (rev 376)
+++ tetex-base/trunk/debian/variables 2005-12-06 12:42:51 UTC (rev 377)
@@ -18,7 +18,9 @@
<:$MOVE_GENERIC_UCF="generic/fontmath.cfg generic/fonttext.cfg generic/preload.cfg":>//
<:$MOVE_CONTEXT_NOUCF="original-adobe-euro.map original-context-symbol.map original-vogel-symbol.map":>//
<:$MOVE_CONTEXT_UCF="original-ams-euler.map original-ams-cmr.map original-youngryu-tx.map original-youngryu-px.map":>//
-<:$unused_contextmaps="il2-ams-cmr.map pl0-ams-cmr.map":>//
+<:$unused_contextmaps="il2-ams-cmr.map pl0-ams-cmr.map original-adobe-euro.map original-ams-cmr.map \
+ original-ams-euler.map original-context-symbol.map original-vogel-symbol.map \
+ original-youngryu-px.map original-youngryu-tx.map":>//
<:$contextmaps_oldplace="pdftex/context":>//
<:$contextmaps_newplace="map/dvips/context":>//
<:#for (@unused_contextmaps_oldplace=split(/ /,$unused_contextmaps)){s{(.*)}{$contextmaps_oldplace/$1}}:>//
@@ -28,7 +30,44 @@
latex/latex.ini platex/platex.ini etex/etex.ini \
context/cont-cz.ini context/cont-de.ini context/cont-en.ini context/cont-it.ini \
context/cont-nl.ini context/cont-ro.ini context/cont-uk.ini":>//
-<:$UNUSED_CONFFILES_BASE="@unused_contextmaps_newplace $unused_inifiles":>//
+<:$unused_conffiles_map_3="map/dvips/antp/antp.map map/dvips/antt/cork-antt.map map/dvips/antt/cs-antt.map \
+map/dvips/antt/exp-antt.map map/dvips/antt/greek-antt.map map/dvips/antt/qx-antt.map map/dvips/antt/t2a-antt.map \
+map/dvips/antt/t2b-antt.map map/dvips/antt/t2c-antt.map map/dvips/antt/texnansi-antt.map map/dvips/antt/wncy-antt.map \
+map/dvips/antt/t5-antt.map map/dvips/cc-pl/ccpl.map map/dvips/lucida/lucidabr-k.map map/dvips/lucida/lucidabr.map \
+map/dvips/lucida/lumath-k.map map/dvips/lucida/lumath.map map/dvips/misc/cmcyr.map map/dvips/misc/cs.map \
+map/dvips/misc/marvosym.map map/dvips/misc/pcrr8rn.map map/dvips/misc/dstroke.map map/dvips/pl/pl.map \
+map/dvips/psnfss/charter.map map/dvips/psnfss/pazo.map map/dvips/psnfss/psnfss.map map/dvips/psnfss/fpls.map \
+map/dvips/psnfssx/pcr8y.map map/dvips/psnfssx/phv8y.map map/dvips/psnfssx/ptm8y.map map/dvips/psnfssx/README.mapfiles \
+map/dvips/qfonts/qbk.map map/dvips/qfonts/qcr.map map/dvips/qfonts/qhv.map map/dvips/qfonts/qpl.map \
+map/dvips/qfonts/qtm.map map/dvips/qfonts/qzc.map map/dvips/tetex/dvipdfm35.map map/dvips/tetex/dvips35.map \
+map/dvips/tetex/hoekwater.map map/dvips/tetex/lucidabr-o.map map/dvips/tetex/lumath-o.map map/dvips/tetex/mathpple.map \
+map/dvips/tetex/mt-belleek.map map/dvips/tetex/mt-plus.map map/dvips/tetex/mt-yy.map map/dvips/tetex/pdftex35.map \
+map/dvips/tetex/ps2pk35.map map/dvips/tetex/pxfonts.map map/dvips/tetex/ttcmex.map map/dvips/tetex/txfonts.map \
+map/dvips/urwvn/urwvn.map map/dvips/vntex/vnr.map map/dvips/context/8r-base.map map/dvips/context/context-base.map \
+map/dvips/context/cork-public-lm.map map/dvips/context/cork-var-exclusive-public-lm.map \
+map/dvips/context/cork-var-public-lm.map map/dvips/context/ec-base.map map/dvips/context/ec-public-lm.map \
+map/dvips/context/ec-var-exclusive-public-lm.map map/dvips/context/ec-var-public-lm.map \
+map/dvips/context/original-adobe-euro.map map/dvips/context/original-base.map \
+map/dvips/context/original-context-symbol.map map/dvips/context/original-dummy.map map/dvips/context/original-empty.map \
+map/dvips/context/original-micropress-informal.map map/dvips/context/original-public-csr.map \
+map/dvips/context/original-public-lm.map map/dvips/context/original-public-plr.map \
+map/dvips/context/original-vogel-symbol.map map/dvips/context/psclean.map map/dvips/context/qx-base.map \
+map/dvips/context/qx-public-lm.map map/dvips/context/texnansi-base.map map/dvips/context/texnansi-public-lm.map \
+map/dvips/context/texnansi-var-exclusive-public-lm.map map/dvips/context/texnansi-var-public-lm.map \
+map/dvips/context/original-public-vnr.map map/dvips/context/t5-base.map map/dvips/context/t5-public-lm.map \
+map/dvipdfm/tetex/cm-dvipdfm-fix.map map/pdftex/cmttf/cmttf.map":>//
+<:$unused_conffiles_misc_3="plain/language.def platex/language.dat platex/hyphen.cfg cyrplain/cyrtex.cfg \
+cslatex/fonttext.cfg cslatex/hyphen.cfg latex/latex209.cfg latex/ltxdoc.cfg latex/ltxguide.cfg \
+latex/texsys.cfg latex/color.cfg latex/graphics.cfg context/texexec.ini context/texexec.rme \
+context/cont-usr.tex dvips/config.ps dvips/config.antp dvips/config.antt dvips/config.mirr \
+dvips/config.outline dvips/config.dfaxhigh dvips/config.pdf dvips/config.dfaxlo dvips/config.pk \
+dvips/config.download35 dvips/config.www dvips/config.gsftopk dvips/config.pl dvips/config.qbk \
+dvips/config.qcr dvips/config.qhv dvips/config.qpl dvips/config.qtm dvips/config.qzc dvips/config.omega \
+dvips/omega.cfg dvipdfm/README.config modes.mf":>//
+<:$unused_conffiles_misc_2="dvips/context.map etex/language.def latex/fontmath.cfg latex/fonttext.cfg \
+ latex/preload.cfg pdftex/cmttf.map":>//
+<:$UNUSED_CONFFILES_BASE="@unused_contextmaps_newplace @unused_contextmaps_oldplace $unused_inifiles \
+ $unused_conffiles_misc_3 $unused_conffiles_map_3 $unused_conffiles_misc_2":>//
<:#unused confdirs are not in fact necessarily unused; they just need:>//
<:#to be removed upon purge, after deleting files in them.:>//
<:$OLDSTUFFDIR="/etc/texmf/oldstuff_unused":>//
More information about the Pkg-tetex-commits
mailing list