[subversion-commit] SVN tetex commit + diffs: r464 -
tex-common/trunk/debian
Frank Küster
frank at costa.debian.org
Tue Jan 17 14:34:12 UTC 2006
Author: frank
Date: 2006-01-17 14:34:12 +0000 (Tue, 17 Jan 2006)
New Revision: 464
Added:
tex-common/trunk/debian/preinst.in
Modified:
tex-common/trunk/debian/changelog
tex-common/trunk/debian/common.variables
tex-common/trunk/debian/postinst.functions
tex-common/trunk/debian/postinst.in
tex-common/trunk/debian/rules
Log:
* Again fixed extensions of files to purge, and take over correct
language.dat handling from tetex-base (see: #321804). [frank]
* Move the handling of 00updmap.cfg from postinst to preinst, where it
belongs [frank]
Modified: tex-common/trunk/debian/changelog
===================================================================
--- tex-common/trunk/debian/changelog 2006-01-17 12:17:43 UTC (rev 463)
+++ tex-common/trunk/debian/changelog 2006-01-17 14:34:12 UTC (rev 464)
@@ -8,12 +8,16 @@
* Drop unneeded paths from TEXFONTMAPS, we now have only 3.0's upstream
value plus our backward-compatibility paths; also change the check in
the postinst accordingly (although the old one would still work, we do
- not allow it for simplicity's sake).
+ not allow it for simplicity's sake). [frank]
* Fix typo in dh_installtexfonts which would echo wrong file names, and
add --quiet to the call of update-updmap in the debhelper scripts
[preining]
+ * Again fixed extensions of files to purge, and take over correct
+ language.dat handling from tetex-base (see: #321804). [frank]
+ * Move the handling of 00updmap.cfg from postinst to preinst, where it
+ belongs [frank]
- -- Norbert Preining <preining at logic.at> Tue, 17 Jan 2006 12:59:25 +0100
+ -- Frank Küster <frank at debian.org> Tue, 17 Jan 2006 15:33:27 +0100
tex-common (0.14) unstable; urgency=low
Modified: tex-common/trunk/debian/common.variables
===================================================================
--- tex-common/trunk/debian/common.variables 2006-01-17 12:17:43 UTC (rev 463)
+++ tex-common/trunk/debian/common.variables 2006-01-17 14:34:12 UTC (rev 464)
@@ -3,8 +3,8 @@
<:# $Id$:>//
<:# this list is from dpkg-1.10.9/include/dpkg.h.in: :>//
<:$DPKG_EXTENSIONS="'~' '%' .bak .dpkg-tmp .dpkg-new .dpkg-old .dpkg-dist":>//
-<:$PREINST_MOVE_EXT="preinst-bak":>//
-<:$POSTINST_MOVE_EXT="postinst-bak":>//
+<:$PREINST_MOVE_EXT=".preinst-bak":>//
+<:$POSTINST_MOVE_EXT=".postinst-bak":>//
<:$PURGE_EXTENSIONS="$DPKG_EXTENSIONS $PREINST_MOVE_EXT $POSTINST_MOVE_EXT":>//
<:# package specific:>//
<:$ETC="/etc/":>//
Modified: tex-common/trunk/debian/postinst.functions
===================================================================
--- tex-common/trunk/debian/postinst.functions 2006-01-17 12:17:43 UTC (rev 463)
+++ tex-common/trunk/debian/postinst.functions 2006-01-17 14:34:12 UTC (rev 464)
@@ -24,92 +24,6 @@
exit $rc
}
-updmap_extract(){
- # we extract the settings from an existing 00updmap.cfg that belonged to
- # tetex-base. If the settings are unchanged from tetex-base's defaults
- # (2.0.2), ucf will know the md5sum and make the changes 2.0.2->3.0
- #
- # The file itself is stored, so that tetex-base can also extract its settings.
- conffile=/etc/texmf/updmap.d/00updmap.cfg
- dfltfile=/usr/share/tex-common/00updmap.cfg
- keepfile=/etc/texmf/updmap.d/10tetex-base.cfg.postinst-old
- tetex_base_file=/etc/texmf/updmap.d/10tetex-base.cfg
- oldmd5sum="82884281d955998e22141cf67b45209d"
- options="dvipsPreferOutline pdftexDownloadBase14 dvipdfmDownloadBase14 dvipsDownloadBase35 LW35"
-
- # is no old version installed?
- test ! -f "$conffile" && return 0 || true
-
- # is it changed?
- if [ ! "$oldmd5sum" = "`md5sum $conffile | cut -d ' ' -f 1`" ]; then
- # changed.
-
- # stow away a copy for tetex-base
- if [ ! -f $keepfile ]; then
- cat > $keepfile <<EOF
-This file contains the parts of what was called 00updmap.cfg in
-teTeX-2.0.2 that now are handled by tetex-base in 10tetex-base.cfg
-
-If you have local changes, please transfer them manually. Changes
-in the items that are still in 00updmap.cfg have been transferred,
-but changed comments are only here.
-
-EOF
- sed -e '0,/^# Map files should be marked by/ d; 1,/^$/ d' \
- $conffile >> $keepfile
- fi
-
- # get the new defaults
-# for option in $options; do
-# eval dflt_$option=`cfgval $dfltfile $option`
-# done
- # set the settings we had in tetex-base 2.0.2
- dflt_dvipsPreferOutline=true
- dflt_LW35=URWkb
- dflt_pdftexDownloadBase14=false
- dflt_dvipdfmDownloadBase14=false
- dflt_dvipsDownloadBase35=false
-
- # compare with current settings, and create a new file
- SETTING_CHANGED=false
- tempdir=`mktemp -d -p $MKTMPDIR`
- tempfile1=`mktemp -p $tempdir`
- trap 'cleanup' HUP INT QUIT BUS PIPE TERM
- cp -p $dfltfile $tempfile1
- for option in $options; do
- eval $option=`cfgval $conffile $option`
- if eval [ ! "\$$option" = "\$dflt_$option" ]; then
- SETTING_CHANGED=true
- tempfile2=`mktemp -p $tempdir`
- optname=$option
- eval optvalue=\$$option
- eval optoldvalue=\$dflt_$option
- sed -e "s@^[[:space:]]*$optname[[:space:]]*$optoldvalue@$optname $optvalue@" $tempfile1 > $tempfile2
- mv $tempfile2 $tempfile1
- fi
- done
- if [ "$SETTING_CHANGED" = "true" ]; then
- # this mv command will give a "conffile changed by you or a script" message next time
- # we change it - but that is exactly what has happened: The user has changed options,
- # and the script has just transferred them to a new file.
- mv $tempfile1 $conffile
- chmod a+r $conffile
- else
- # this part is unchanged, just remove and copy the default file
- # (a copy is already saved).
- rm -f $tempfile1 $conffile
- cp -p $dfltfile $conffile
- fi
- rm -rf "$tempdir"
-
- else
- # unchanged, just remove and copy the default file
- rm -f $conffile
- cp -p $dfltfile $conffile
- fi
-
-}
-
check_texmf(){
file=$1
variable=$2
Modified: tex-common/trunk/debian/postinst.in
===================================================================
--- tex-common/trunk/debian/postinst.in 2006-01-17 12:17:43 UTC (rev 463)
+++ tex-common/trunk/debian/postinst.in 2006-01-17 14:34:12 UTC (rev 464)
@@ -11,7 +11,6 @@
TEXMFSYSVAR="<:=$TEXMFSYSVAR:>"
UCF="ucf --debconf-ok"
#UCF="ucf -d --debconf-ok --verbose"
-FIRST_VERSION_WITH_UPGRADE_PATH=0.3
OLD_LDAT=/etc/texmf/language.dat
POSTINST_MOVE_EXT="<:=$POSTINST_MOVE_EXT:>"
ls_R_magic='% ls-R -- filename database for kpathsea; do not change this line.
@@ -50,14 +49,19 @@
# is there a file /etc/texmf/language.dat already? Move it out of the way
if [ -f $OLD_LDAT ]; then
- cat > $OLD_LDAT.$POSTINST_MOVE_EXT <<EOF
+ old_ldat_md5sum=`md5sum $OLD_LDAT`
+ # do nothing if the md5sum matches sarge's or woody's default:
+ if [ ! "$old_ldat_md5sum" = fe9baf0768ade79a585a9df568dac5f6 ] && \
+ [ ! "$old_ldat_md5sum" = 1d2d9b25a41ab1cec892bd3382af7645 ]; then
+ cat > $OLD_LDAT.$POSTINST_MOVE_EXT <<EOF
This file is no longer used and has therefore been renamed by the postinst
-script of the tex-common package.
+script of the tetex-base package.
Please use the mechanism described in update-language(8) instead.
EOF
- cat $OLD_LDAT >> $OLD_LDAT.$POSTINST_MOVE_EXT
+ cat $OLD_LDAT >> $OLD_LDAT.$POSTINST_MOVE_EXT
+ fi
rm $OLD_LDAT
fi
@@ -68,7 +72,10 @@
$UCF /usr/share/tex-common/`basename $file` /etc/texmf/$file
done
-# remove left over fmt/efmt/log files in /usr/share/texmf/web2c/
+# remove left over fmt/efmt/log files in /usr/share/texmf/web2c/. If they are
+# there, it's because of an old bug or user misconfiguration, and they are
+# never registered to dpkg.
+#
# move out of the way old config files
#
if [ -d /usr/share/texmf/web2c ] ; then
Added: tex-common/trunk/debian/preinst.in
===================================================================
--- tex-common/trunk/debian/preinst.in 2006-01-17 12:17:43 UTC (rev 463)
+++ tex-common/trunk/debian/preinst.in 2006-01-17 14:34:12 UTC (rev 464)
@@ -0,0 +1,135 @@
+#include variables
+#!/bin/bash -e
+#
+# preinst maintainer script for the Debian tex-common 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
+FIRST_VERSION_WITH_UPGRADE_PATH=0.3
+
+#################################################################
+# Functions
+#################################################################
+
+updmap_extract(){
+ # we extract the settings from an existing 00updmap.cfg that belonged to
+ # tetex-base. If the settings are unchanged from tetex-base's defaults
+ # (2.0.2), ucf will know the md5sum and make the changes 2.0.2->3.0
+ #
+ # The file itself is stored, so that tetex-base can also extract its settings.
+ conffile=/etc/texmf/updmap.d/00updmap.cfg
+ dfltfile=/usr/share/tex-common/00updmap.cfg
+ keepfile=/etc/texmf/updmap.d/10tetex-base.cfg.postinst-old
+ tetex_base_file=/etc/texmf/updmap.d/10tetex-base.cfg
+ oldmd5sum="82884281d955998e22141cf67b45209d"
+ options="dvipsPreferOutline pdftexDownloadBase14 dvipdfmDownloadBase14 dvipsDownloadBase35 LW35"
+
+ # is no old version installed?
+ test ! -f "$conffile" && return 0 || true
+
+ # is it changed?
+ if [ ! "$oldmd5sum" = "`md5sum $conffile | cut -d ' ' -f 1`" ]; then
+ # changed.
+
+ # stow away a copy for tetex-base
+ if [ ! -f $keepfile ]; then
+ cat > $keepfile <<EOF
+This file contains the parts of what was called 00updmap.cfg in
+teTeX-2.0.2 that now are handled by tetex-base in 10tetex-base.cfg
+
+If you have local changes, please transfer them manually. Changes
+in the items that are still in 00updmap.cfg have been transferred,
+but changed comments are only here.
+
+EOF
+ sed -e '0,/^# Map files should be marked by/ d; 1,/^$/ d' \
+ $conffile >> $keepfile
+ fi
+
+ # get the new defaults
+# for option in $options; do
+# eval dflt_$option=`cfgval $dfltfile $option`
+# done
+ # set the settings we had in tetex-base 2.0.2
+ dflt_dvipsPreferOutline=true
+ dflt_LW35=URWkb
+ dflt_pdftexDownloadBase14=false
+ dflt_dvipdfmDownloadBase14=false
+ dflt_dvipsDownloadBase35=false
+
+ # compare with current settings, and create a new file
+ SETTING_CHANGED=false
+ tempdir=`mktemp -d -p $MKTMPDIR`
+ tempfile1=`mktemp -p $tempdir`
+ trap 'cleanup' HUP INT QUIT BUS PIPE TERM
+ cp -p $dfltfile $tempfile1
+ for option in $options; do
+ eval $option=`cfgval $conffile $option`
+ if eval [ ! "\$$option" = "\$dflt_$option" ]; then
+ SETTING_CHANGED=true
+ tempfile2=`mktemp -p $tempdir`
+ optname=$option
+ eval optvalue=\$$option
+ eval optoldvalue=\$dflt_$option
+ sed -e "s@^[[:space:]]*$optname[[:space:]]*$optoldvalue@$optname $optvalue@" $tempfile1 > $tempfile2
+ mv $tempfile2 $tempfile1
+ fi
+ done
+ if [ "$SETTING_CHANGED" = "true" ]; then
+ # this mv command will give a "conffile changed by you or a script" message next time
+ # we change it - but that is exactly what has happened: The user has changed options,
+ # and the script has just transferred them to a new file.
+ mv $tempfile1 $conffile
+ chmod a+r $conffile
+ else
+ # this part is unchanged, just remove and copy the default file
+ # (a copy is already saved).
+ rm -f $tempfile1 $conffile
+ cp -p $dfltfile $conffile
+ fi
+ rm -rf "$tempdir"
+
+ else
+ # unchanged, just remove and copy the default file
+ rm -f $conffile
+ cp -p $dfltfile $conffile
+ fi
+
+}
+
+# <:open(FUNCTIONS,'common.functions');@FUNCTIONS=<FUNCTIONS>;close(FUNCTIONS):>//
+# <:=@FUNCTIONS:>//
+
+#################################################################
+# Here starts the real action
+#################################################################
+
+case "$1" in
+ # install is also used if the old package is in state rc
+ upgrade|install)
+
+ ## upgrade from 2.0.2 in sarge
+ configured_version=$2
+ # we must keep changes to the option part of 00updmap.cfg, if it is
+ # installed (from an older tetex-base package)
+ dpkg --compare-versions \
+ $FIRST_VERSION_WITH_UPGRADE_PATH gt "$configured_version" && \
+ updmap_extract
+
+ ;;
+ failed-upgrade|abort-upgrade)
+ :
+ ;;
+esac
+
+#DEBHELPER#
+
+
+# Local Variables:
+# mode: shell-script
+# skeleton-pair: t
+# End:
+
Modified: tex-common/trunk/debian/rules
===================================================================
--- tex-common/trunk/debian/rules 2006-01-17 12:17:43 UTC (rev 463)
+++ tex-common/trunk/debian/rules 2006-01-17 14:34:12 UTC (rev 464)
@@ -16,9 +16,9 @@
bin_manpages=$(foreach script,$(bin_scripts), scripts/$(script).1) scripts/update-updmap.1
# create maintainer scripts etc.
-EPERL_FILES := debian/common.functions debian/postinst debian/postrm debian/config
+EPERL_FILES := debian/common.functions debian/postinst debian/postrm debian/config debian/preinst
eperl_sourcefiles=debian/variables debian/COPYRIGHT.scripts debian/postinst.functions \
- debian/common.variables debian/common.functions debian/postrm.functions
+ debian/common.variables debian/common.functions debian/postrm.functions
# Eperl is simply great: thanks, Davide!
% :: %.in $(eperl_sourcefiles)
More information about the Pkg-tetex-commits
mailing list