[subversion-commit] SVN tetex commit + diffs: r388 - in tex-common/trunk: debian scripts

Frank Küster frank at costa.debian.org
Thu Dec 8 21:58:10 UTC 2005


Author: frank
Date: 2005-12-08 21:58:10 +0000 (Thu, 08 Dec 2005)
New Revision: 388

Modified:
   tex-common/trunk/debian/common.functions.in
   tex-common/trunk/debian/common.variables
   tex-common/trunk/scripts/dh_installtexfonts
Log:
- changes to common.functions.in and common.variables for tetex's
  migration to no conffiles and texmfdist
- dh_installtexfonts: honor -v switch correctly (I hope)


Modified: tex-common/trunk/debian/common.functions.in
===================================================================
--- tex-common/trunk/debian/common.functions.in	2005-12-08 17:56:37 UTC (rev 387)
+++ tex-common/trunk/debian/common.functions.in	2005-12-08 21:58:10 UTC (rev 388)
@@ -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
@@ -221,6 +228,74 @@
 
 }
 
+get_newfilename(){
+  file="$1" # without leading /etc/texmf
+  basedir=${file%%/*}
+  restname=$(echo ${file#*/})
+  case $basedir in
+    $file)
+      case $file in
+	modes.mf)
+	  echo metafont/misc/modes.mf
+	  ;;
+	mktex.cnf)
+	  echo web2c/mktex.cnf
+      esac
+      ;;
+    map)
+      echo fonts/$file
+      ;;
+    dvips)
+      echo $basedir/config/$restname
+      ;;
+      *)
+      echo tex/$basedir/config/$restname
+      ;;
+  esac
+}
+
+dpkg_md5sum(){
+  grep "$1[[:space:]]"  /var/lib/dpkg/status | cut -f 3 -d ' '
+}
+
+ucf_md5sum(){
+  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: tex-common/trunk/debian/common.variables
===================================================================
--- tex-common/trunk/debian/common.variables	2005-12-08 17:56:37 UTC (rev 387)
+++ tex-common/trunk/debian/common.variables	2005-12-08 21:58:10 UTC (rev 388)
@@ -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: tex-common/trunk/scripts/dh_installtexfonts
===================================================================
--- tex-common/trunk/scripts/dh_installtexfonts	2005-12-08 17:56:37 UTC (rev 387)
+++ tex-common/trunk/scripts/dh_installtexfonts	2005-12-08 21:58:10 UTC (rev 388)
@@ -188,6 +188,7 @@
 			error("The config file $tmp/etc/texmf/updmap.d/$pr$bn already exists! Cannot recreate it, please call dh_clean -k!");
 		open(CFGFILE, ">$tmp/etc/texmf/updmap.d/$pr$bn") ||
 			error("Cannot open $tmp/etc/texmf/updmap.d/$pr$bn for writing!");
+		verbose_print("Writing $tmp/etc/texmf/updmap.d/$pr$bn");
 		if (!magic_comment_present($fn)) {
 			print CFGFILE "# $pr$bn\n";
 			print CFGFILE $magicheader;
@@ -208,6 +209,7 @@
 			error("The config file $tmp/etc/texmf/updmap.d/$priority$package.cfg already exists! Cannot recreate it, please call dh_clean -k!");
 		open(CFGFILE, ">$tmp/etc/texmf/updmap.d/$priority$package.cfg") || 
 			error("Cannot open $tmp/etc/texmf/updmap.d/$priority$package.cfg for writing!");
+		verbose_print("Writing $tmp/etc/texmf/updmap.d/$priority$package.cfg");
 		if (($file && !magic_comment_present($file)) ||
 		    (!$file && ($#cmdlinemaps >= 0))) {
 			print CFGFILE "# $priority$package.cfg\n";
@@ -228,6 +230,7 @@
         }
 	open(LISTFILE, ">>$tmp/var/lib/tex-common/fontmap-cfg/$package.list")||
 		error("Cannot open $tmp/var/lib/tex-common/fmtutil-cnf/$package.list for writing/appending!");
+	verbose_print("Writing $tmp/var/lib/tex-common/fmtutil-cnf/$package.list");
 	foreach (@listlines) {
 		print LISTFILE "$_\n";
 	}




More information about the Pkg-tetex-commits mailing list