[subversion-commit] SVN tetex commit + diffs: r199 - tex-common/trunk/debian

Norbert Preining preining-guest at costa.debian.org
Wed Oct 5 17:10:56 UTC 2005


Author: preining-guest
Date: 2005-10-05 17:10:55 +0000 (Wed, 05 Oct 2005)
New Revision: 199

Modified:
   tex-common/trunk/debian/changelog
   tex-common/trunk/debian/config.in
   tex-common/trunk/debian/postinst.in
Log:
Fix various bugs in tex-common config handling, and fix bug #332264 (partly)


Modified: tex-common/trunk/debian/changelog
===================================================================
--- tex-common/trunk/debian/changelog	2005-10-05 14:49:48 UTC (rev 198)
+++ tex-common/trunk/debian/changelog	2005-10-05 17:10:55 UTC (rev 199)
@@ -1,3 +1,11 @@
+tex-common (0.8.1) UNRELEASED; urgency=low
+
+  * Fix the management of ls-R files. Do not manage /usr/local/share/texmf
+    if it is not a link to /var/lib/texmf/ls-R-LOCAL. Always set the 
+    permissions and owners of all ls-R files. [preining] (Closes: #332264)
+
+ -- Norbert Preining <preining at logic.at>  Wed,  5 Oct 2005 19:05:00 +0200
+
 tex-common (0.8) unstable; urgency=low
 
   * Change hyph_size to 8191 - according to DEK it should be a prime

Modified: tex-common/trunk/debian/config.in
===================================================================
--- tex-common/trunk/debian/config.in	2005-10-05 14:49:48 UTC (rev 198)
+++ tex-common/trunk/debian/config.in	2005-10-05 17:10:55 UTC (rev 199)
@@ -17,7 +17,7 @@
 # move the answers from tetex-bin to tex-common, if there are no answers
 # in the tex-common db
 maybe_move_answer_and_delete() {
-    $ans = $1
+    ans=$1
     # did the user already see this question?
     db_fget tex-common/$ans seen || true
     if [ "$RET" = false ] ; then
@@ -55,7 +55,7 @@
 db_unregister tetex-bin/lsr-perms || true
 
 db_get tex-common/managedlsr && SELECTED_LSR="$RET"
-if [ ! -n "$SELECTED_LSR" ]; then
+if [ -n "$SELECTED_LSR" ]; then
     maybe_move_answer_and_delete groupname   
     maybe_move_answer_and_delete groupperm
     maybe_move_answer_and_delete userperm

Modified: tex-common/trunk/debian/postinst.in
===================================================================
--- tex-common/trunk/debian/postinst.in	2005-10-05 14:49:48 UTC (rev 198)
+++ tex-common/trunk/debian/postinst.in	2005-10-05 17:10:55 UTC (rev 199)
@@ -128,11 +128,8 @@
       fi
       db_get tex-common/groupname || true
       LSRGROUP="$RET"
-      # work through the list, stolen from locales.postinst
-      list=`echo $MANAGEDLSR | sed -e 's/, /,/g'`
-      save_IFS=$IFS
-      IFS=,
-      for lsr in $list; do
+      # fix permissions of all the ls-R files
+      for lsr in main var local cache ; do
         case $lsr in 
 	  main) LSR=$TEXMFSYSVAR/ls-R-TEXMFMAIN ;;
 	  var)  LSR=$TEXMFSYSVAR/ls-R ;;
@@ -140,13 +137,38 @@
 	  cache) LSR=/var/cache/fonts/ls-R ;;
 	  *) echo "This should not happen: Don't know how to set this! $lsr" ;;
 	esac
-        chmod -v $LSRPERMS $LSR 2>/dev/null | fgrep changed || true
-	chgrp -v $LSRGROUP $LSR 2>/dev/null | fgrep changed || true
+	# special check wether the local ls-R is actually a link to var
+	domanage=1
+	if [ $lsr = local ] ; then
+	  lsrlocalok=1
+	  if [ -L /usr/local/share/texmf/ls-R ] ; then
+	    linkdest=`readlink /usr/local/share/texmf/ls-R`
+	    if [ ! "X$linkdest" = "X$LSR" ] ; then
+	      lsrlocalok=0
+	    fi
+	  else
+	    lsrlocalok=0
+	  fi
+	  # /usr/local/share/texmf/ls-R is either not a link or not the
+	  # right link, ship out a message!
+	  if [ $lsrlocalok = 0 ] ; then
+	    # what do we do here?
+	    # can we inform the user that something is wrong here?
+	    domanage=0
+	  fi
+	fi
+	if [ $domanage = 1 ] ; then
+	  if echo "$MANAGEDLSR" | grep -q $lsr ; then
+	    # this lsr is managed by debconf
+	    chmod -v $LSRPERMS $LSR 2>/dev/null | fgrep changed || true
+	    chgrp -v $LSRGROUP $LSR 2>/dev/null | fgrep changed || true
+	  else
+	    # this lsr has standard permissions
+	    chmod -v 644 $LSR 2>/dev/null | fgrep changed || true
+	    chown -v root:staff $LSR 2>/dev/null | fgrep changed || true
+	  fi
+	fi
       done
-      IFS=$save_IFS
-    else
-      echo "Fixing permissions of ls-R files ..."
-      chmod -v 644 $LSRS 2>/dev/null | fgrep changed || true
     fi
     ;;
   *)




More information about the Pkg-tetex-commits mailing list