[subversion-commit] SVN tetex commit + diffs: r387 - in tetex-base/trunk/debian: . rules.d

Frank Küster frank at costa.debian.org
Thu Dec 8 17:56:38 UTC 2005


Author: frank
Date: 2005-12-08 17:56:37 +0000 (Thu, 08 Dec 2005)
New Revision: 387

Modified:
   tetex-base/trunk/debian/changelog
   tetex-base/trunk/debian/common.functions.in
   tetex-base/trunk/debian/postinst.in
   tetex-base/trunk/debian/preinst.in
   tetex-base/trunk/debian/rules.d/install.mk
   tetex-base/trunk/debian/rules.in
   tetex-base/trunk/debian/tetex-extra.postinst.in
   tetex-base/trunk/debian/tetex-extra.postrm.in
   tetex-base/trunk/debian/tetex-extra.preinst.in
   tetex-base/trunk/debian/variables
Log:
* Since /etc/texmf is a real TEXMF tree now, TeX input files are no
  longer treated as configuration files.  Upon upgrade, unchanged files
  are removed, changed ones are moved to appropriate directories where
  they are found by kpathsea [frank]
* Install files in TEXMFDIST, i.e. /usr/share/texmf-tetex, and depend on
  tex-common (>=0.12) [frank]
* fix marvosym stuff

Modified: tetex-base/trunk/debian/changelog
===================================================================
--- tetex-base/trunk/debian/changelog	2005-12-08 16:12:43 UTC (rev 386)
+++ tetex-base/trunk/debian/changelog	2005-12-08 17:56:37 UTC (rev 387)
@@ -1,17 +1,21 @@
 tetex-base (3.0-10.1) unreleased; urgency=low
 
+  * Since /etc/texmf is a real TEXMF tree now, TeX input files are no
+    longer treated as configuration files.  Upon upgrade, unchanged files
+    are removed, changed ones are moved to appropriate directories where
+    they are found by kpathsea [frank]
+  * Install files in TEXMFDIST, i.e. /usr/share/texmf-tetex, and depend on
+    tex-common (>=0.12) [frank]
   * Install changelog.Debian in tetex-doc, too (closes: #338334)
   * Unset variables that might override texmf.cnf settings in postinst
     [frank] 
   * Remove tetex-extra's format and log files when the package is removed,
     thanks to Kevin B. McCarty <kmccarty at princeton.edu> (closes: #341110)
     [frank]
-  * Install files in TEXMFDIST, i.e. /usr/share/texmf-tetex, and depend on
-    tex-common (>=0.12) [frank]
   * Install an updated copy of marvosym.pfb from CTAN, it is still buggy
     in teTeX 3.0 (closes: #261529) [frank]
 
- -- Frank Küster <frank at debian.org>  Thu,  8 Dec 2005 14:32:31 +0100
+ -- Frank Küster <frank at debian.org>  Thu,  8 Dec 2005 18:56:00 +0100
 
 tetex-base (3.0-10) unstable; urgency=low
 

Modified: tetex-base/trunk/debian/common.functions.in
===================================================================
--- tetex-base/trunk/debian/common.functions.in	2005-12-08 16:12:43 UTC (rev 386)
+++ tetex-base/trunk/debian/common.functions.in	2005-12-08 17:56:37 UTC (rev 387)
@@ -10,7 +10,14 @@
 SYMLINK_MOVE_EXT=<:=$SYMLINK_MOVE_EXT:>
 TEXMFSYSVAR=<:=$TEXMFSYSVAR:>
 
-savemove(){
+debug(){
+  true "$*"
+}
+# debug(){
+#   echo -en "$*"
+# }
+
+xsavemove(){
   source="$1"
   dest="$2"
   chown --reference=$dest $source
@@ -248,13 +255,47 @@
 }
 
 dpkg_md5sum(){
-  grep $1  /var/lib/dpkg/status | cut -f 3 -d ' '
+  grep "$1[[:space:]]"  /var/lib/dpkg/status | cut -f 3 -d ' '
 }
 
 ucf_md5sum(){
-  grep $1  /var/lib/ucf/hashfile | cut -f 1 -d ' '
+  grep "$1$"  /var/lib/ucf/hashfile | cut -f 1 -d ' '
 }
 
+preinst_remove_or_move(){
+  file=/etc/texmf/$1
+  newname=`get_newfilename $1`
+  debug $file
+  test -f "$file" || return 0
+  debug "handled\n"
+  oldmd5sum=`dpkg_md5sum $file`
+  currmd5sum=`md5sum $file | cut -d ' ' -f 1`
+  if [ "$oldmd5sum" = "$currmd5sum" ]; then
+    mv $file $oldstuff_dir/`basename $file`.$PREINST_MOVE_EXT
+  else
+    newdir=`dirname /etc/texmf/$newname`
+    mkdir -p $newdir
+    mv $file /etc/texmf/$newname
+  fi
+}
+preinst_remove_or_move_ucf(){
+  file=/etc/texmf/$1
+  newname=`get_newfilename $1`
+  debug $file
+  test -f "$file" || return 0
+  debug "handled\n"
+  oldmd5sum=`ucf_md5sum $file`
+  currmd5sum=`md5sum $file | cut -d ' ' -f 1`
+  if [ "$oldmd5sum" = "$currmd5sum" ]; then
+    mv $file $oldstuff_dir/`basename $file`.$PREINST_MOVE_EXT
+  else
+    mv $file /etc/texmf/$newname
+    if [ -x /usr/bin/ucf ]; then ucf --purge $file; fi
+  fi
+}
+
+
+
 #################################################################
 ##  End of function definitions from file common.functions
 #################################################################

Modified: tetex-base/trunk/debian/postinst.in
===================================================================
--- tetex-base/trunk/debian/postinst.in	2005-12-08 16:12:43 UTC (rev 386)
+++ tetex-base/trunk/debian/postinst.in	2005-12-08 17:56:37 UTC (rev 387)
@@ -27,8 +27,6 @@
 FORMER_UCF="<:=$BASE_UCF:>"
 UNUSED_CONFFILES="<:=$UNUSED_CONFFILES_BASE:>"
 
-UNUSED_CONFDIRS="<:=$UNUSED_CONFDIRS_BASE:>"
-
 umask 022
 
 # no debconf questions currently

Modified: tetex-base/trunk/debian/preinst.in
===================================================================
--- tetex-base/trunk/debian/preinst.in	2005-12-08 16:12:43 UTC (rev 386)
+++ tetex-base/trunk/debian/preinst.in	2005-12-08 17:56:37 UTC (rev 387)
@@ -13,6 +13,7 @@
 PREINST_MOVE_EXT=<:=$PREINST_MOVE_EXT:>
 FORMER_UCF="<:=$BASE_UCF:>"
 oldstuff_dir=<:=$OLDSTUFFDIR:>
+UNUSED_CONFDIRS="<:=$UNUSED_CONFDIRS_BASE:>"
 
 # UPDMAP_CFG=/etc/texmf/updmap.d/10tetex-base.cfg
 # UPDMAP_CFG_TRANSITION=/etc/texmf/updmap.d/00updmap.cfg_keep-for-tetex-base
@@ -26,46 +27,6 @@
 <:open(FUNCTIONS,'common.functions');@FUNCTIONS=<FUNCTIONS>;close(FUNCTIONS):>//
 <:=@FUNCTIONS:>//
 
-debug(){
-  true "$*"
-}
-# debug(){
-#   echo -en "$*"
-# }
-
-preinst_remove_or_move(){
-  file=/etc/texmf/$1
-  newname=`get_newfilename $1`
-  debug $file
-  test -f "$file" || return 0
-  debug "handled\n"
-  oldmd5sum=`dpkg_md5sum $file`
-  currmd5sum=`md5sum $file | cut -d ' ' -f 1`
-  if [ "$oldmd5sum" = "$currmd5sum" ]; then
-    mv $file $oldstuff_dir/`basename $file`.$PREINST_MOVE_EXT
-  else
-    newdir=`dirname /etc/texmf/$newname`
-    mkdir -p $newdir
-    mv $file /etc/texmf/$newname
-    (cd /etc/texmf; rmdir --ignore-fail-on-non-empty -p `dirname $file`)
-  fi
-}
-preinst_remove_or_move_ucf(){
-  file=/etc/texmf/$1
-  newname=`get_newfilename $1`
-  debug $file
-  test -f "$file" || return 0
-  debug "handled\n"
-  oldmd5sum=`ucf_md5sum $file`
-  currmd5sum=`md5sum $file | cut -d ' ' -f 1`
-  if [ "$oldmd5sum" = "$currmd5sum" ]; then
-    mv $file $oldstuff_dir/`basename $file`.$PREINST_MOVE_EXT
-  else
-    mv $file /etc/texmf/$newname
-    if [ -x /usr/bin/ucf ]; then ucf --purge $file; fi
-  fi
-}
-
 #################################################################
 # Here starts the real action
 #################################################################
@@ -93,7 +54,7 @@
 
 # remove obsolete conffiles if they are unchanged, 
 # otherwise move them to the appropriate place
-    mkdir $oldstuff_dir
+    test -d  $oldstuff_dir || mkdir $oldstuff_dir
     for file in $UNUSED_CONFFILES; do
       preinst_remove_or_move $file
     done

Modified: tetex-base/trunk/debian/rules.d/install.mk
===================================================================
--- tetex-base/trunk/debian/rules.d/install.mk	2005-12-08 16:12:43 UTC (rev 386)
+++ tetex-base/trunk/debian/rules.d/install.mk	2005-12-08 17:56:37 UTC (rev 387)
@@ -79,8 +79,8 @@
 
 # replace buggy marvosym.pfb with a version from CTAN,
 # http://www.ctan.org/tex-archive/fonts/psfonts/marvosym/
-	rm          $txmfdir/fonts/type1/public/marvosym/marvosym.pfb
-	uudecode -o $txmfdir/fonts/type1/public/marvosym/marvosym.pfb debian/patches/marvosym.pfb.uu
+	rm          $(txmfdir)/fonts/type1/public/marvosym/marvosym.pfb
+	uudecode -o $(txmfdir)/fonts/type1/public/marvosym/marvosym.pfb debian/patches/marvosym.pfb.uu
 
 ## Done installing tetex-base!
 	touch $@

Modified: tetex-base/trunk/debian/rules.in
===================================================================
--- tetex-base/trunk/debian/rules.in	2005-12-08 16:12:43 UTC (rev 386)
+++ tetex-base/trunk/debian/rules.in	2005-12-08 17:56:37 UTC (rev 387)
@@ -49,8 +49,6 @@
 include debian/rules.d/filelists.mk
 include debian/rules.d/install.mk
 
-# export DSF-PATCHLIST=debian/patches/patchlist.mk
-# include /usr/share/dsfp/dsf-patch.mk
 # needed for quilt:
 export QUILT_PATCHES=./debian/patches
 

Modified: tetex-base/trunk/debian/tetex-extra.postinst.in
===================================================================
--- tetex-base/trunk/debian/tetex-extra.postinst.in	2005-12-08 16:12:43 UTC (rev 386)
+++ tetex-base/trunk/debian/tetex-extra.postinst.in	2005-12-08 17:56:37 UTC (rev 387)
@@ -6,6 +6,10 @@
 <:=@COPYRIGHT:>//
 
 ## Define static variables we need
+UNUSED_CONFFILES="<:=$UNUSED_CONFFILES_EXTRA:>"
+FORMER_UCF="<:=$BLUESKY_UCF:>"
+PREINST_MOVE_EXT=<:=$PREINST_MOVE_EXT:>
+oldstuff_dir=<:=$OLDSTUFFDIR:>
 
 
 <:open(FUNCTIONS,'common.functions');@FUNCTIONS=<FUNCTIONS>;close(FUNCTIONS):>//
@@ -17,8 +21,17 @@
 
 case "$1" in
   configure|abort-*)
-    # here starts the real postinst stuff
 
+    # remove backup files from preinst
+    for file in $UNUSED_CONFFILES; do
+      rm -f $oldstuff_dir/`basename $file`.$PREINST_MOVE_EXT
+    done
+    for file in $FORMER_UCF; do
+      rm -f $oldstuff_dir/`basename $file`.$PREINST_MOVE_EXT
+      if [ -x /usr/bin/ucf ]; then ucf --purge /etc/texmf/$file; fi
+    done
+    rmdir $oldstuff_dir 2>/dev/null || true # ignore errors if nonexistent or non-empty
+
     mktexlsr
     echo "Creating missing formats."
     create_tetex_formats --missing

Modified: tetex-base/trunk/debian/tetex-extra.postrm.in
===================================================================
--- tetex-base/trunk/debian/tetex-extra.postrm.in	2005-12-08 16:12:43 UTC (rev 386)
+++ tetex-base/trunk/debian/tetex-extra.postrm.in	2005-12-08 17:56:37 UTC (rev 387)
@@ -12,9 +12,10 @@
 <:=@FUNCTIONS:>//
 
 ## Static variable definitions
-BLUESKY_UCF="<:=$BLUESKY_UCF:>"
-NOWLINKDIRS="<:=$NOWLINKDIRS:>"
-NOWDIRLINKS="<:=$NOWDIRLINKS:>"
+UNUSED_CONFFILES="<:=$UNUSED_CONFFILES_EXTRA:>"
+FORMER_UCF="<:=$BLUESKY_UCF:>"
+PREINST_MOVE_EXT=<:=$PREINST_MOVE_EXT:>
+UNUSED_CONFDIRS="<:=$UNUSED_CONFDIRS_EXTRA:>"
 
 EXTRA_FORMATS="amstex.fmt lambda.fmt lamed.fmt metafun.mem mpost.mem"
 
@@ -46,11 +47,22 @@
     run_if_exist mktexlsr
     ;;
   purge)
-    ucf_purge -d /etc/texmf/dvips $BLUESKY_UCF 
+    for oldconffile in $UNUSED_CONFFILES $FORMER_UCF; do
+      newname=`get_newfilename $oldconffile`
+      remove_with_backups /etc/texmf/$newname
+    done
+    for oldconfdir in $UNUSED_CONFDIRS; do
+      rmdir /etc/texmf/$oldconfdir 2>/dev/null || true
+    done
     run_if_exist mktexlsr
     ;;
   abort-install|abort-upgrade)
-    :
+    for file in $UNUSED_CONFFILES; do
+      postrm_abort_restore_file $file
+    done
+    for file in $FORMER_UCF; do
+      postrm_abort_restore_file_ucf $file
+    done
     ;;
 esac
 

Modified: tetex-base/trunk/debian/tetex-extra.preinst.in
===================================================================
--- tetex-base/trunk/debian/tetex-extra.preinst.in	2005-12-08 16:12:43 UTC (rev 386)
+++ tetex-base/trunk/debian/tetex-extra.preinst.in	2005-12-08 17:56:37 UTC (rev 387)
@@ -6,8 +6,11 @@
 <:=@COPYRIGHT:>//
 
 ## Define static variables we need
-NOWLINKDIRS="<:=$NOWLINKDIRS:>"
-NOWDIRLINKS="<:=$NOWDIRLINKS:>"
+UNUSED_CONFFILES="<:=$UNUSED_CONFFILES_EXTRA:>"
+FORMER_UCF="<:=$BLUESKY_UCF:>"
+PREINST_MOVE_EXT=<:=$PREINST_MOVE_EXT:>
+oldstuff_dir=<:=$OLDSTUFFDIR:>
+UNUSED_CONFDIRS="<:=$UNUSED_CONFDIRS_EXTRA:>"
 
 
 
@@ -20,15 +23,18 @@
 
 case "$1" in
   install|upgrade)
-    # tetex-base does this, too.  But -extra can be unpacked before it, therefore
-    # we have to do the preinst and prerm stuff, too.  
-    for dir in $NOWLINKDIRS; do
-      preinst_move_dir /usr/share/texmf/$dir
+# remove obsolete conffiles if they are unchanged, 
+# otherwise move them to the appropriate place
+    test -d $oldstuff_dir || mkdir $oldstuff_dir
+    for file in $UNUSED_CONFFILES; do
+      preinst_remove_or_move $file
     done
-# same in the other direction
-    for dir in $NOWDIRLINKS; do
-      preinst_move_symlink /usr/share/texmf/$dir
+    for file in $FORMER_UCF; do
+      preinst_remove_or_move_ucf $file
     done
+    for dir in $UNUSED_CONFDIRS $oldstuff_dir; do
+      test -d $dir && rmdir --ignore-fail-on-non-empty $dir || true
+    done
     ;;
 esac
 

Modified: tetex-base/trunk/debian/variables
===================================================================
--- tetex-base/trunk/debian/variables	2005-12-08 16:12:43 UTC (rev 386)
+++ tetex-base/trunk/debian/variables	2005-12-08 17:56:37 UTC (rev 387)
@@ -77,7 +77,11 @@
 <:$BASE_UCF="mktex.cnf dvips/config.builtin35 dvipdfm/config \\
     map/dvips/tetex/contnav.map generic/pdftexconfig.tex \\
     $MOVE_GENERIC_UCF @MOVE_CONTEXT_UCF_NEWPLACE":>//
-<:$BLUESKY_UCF="config.ams config.cm config.amz config.cmz":>//
+<:$unused_conffiles_extra_latex="SIunits.cfg adrdir.cfg adrplaner.cfg adrsmall.cfg draftcopy.cfg efxmpl.cfg geometry.cfg htex4ht.cfg hyperref.cfg jblong.cfg jurabib.cfg lettrine.cfg listings.cfg microtype.cfg mt-bch.cfg mt-cmr.cfg mt-pad.cfg mt-pmn.cfg mt-ppl.cfg mt-ptm.cfg pict2e.cfg subfig.cfg subfigure.cfg seminar.con":>//
+<:for (@unused_conffiles_extra_latex=split(/ /,$unused_conffiles_extra_latex)){s{(.*)}{latex/$1}}:>//
+<:$unused_conffiles_extra_misc="map/dvips/ams/psfonts.ams map/dvips/ams/psfonts.amz map/dvips/ams/psfonts.cm map/dvips/ams/psfonts.cmz map/dvips/misc/eurosym.map map/dvips/omega/omega.map map/dvips/tetex/bsr-interpolated.map map/dvips/tetex/bsr.map map/dvips/xypic/xypic.map lambda/language.dat":>//
+<:$UNUSED_CONFFILES_EXTRA="@unused_conffiles_extra_latex $unused_conffiles_extra_misc":>//
+<:$BLUESKY_UCF="dvips/config.ams dvips/config.cm dvips/config.amz dvips/config.cmz":>//
 <:$generated_maps_dvips="download35.map builtin35.map psfonts_t1.map psfonts_pk.map ps2pk.map":>//
 <:$generated_maps_dvipdfm="dvipdfm_dl14.map dvipdfm_ndl14.map":>//
 <:$generated_maps_pdftex="pdftex_dl14.map pdftex_ndl14.map":>//




More information about the Pkg-tetex-commits mailing list