[Debian-tex-commits] SVN tex-common commit + diffs: r3995 - in tex-common/trunk: debian scripts

Norbert Preining preining at alioth.debian.org
Sat Jun 6 16:00:52 UTC 2009


Author: preining
Date: 2009-06-06 16:00:52 +0000 (Sat, 06 Jun 2009)
New Revision: 3995

Modified:
   tex-common/trunk/debian/changelog
   tex-common/trunk/debian/postrm.in
   tex-common/trunk/scripts/postrm-tex
Log:
* change dh_installtex generated postrm code to call update-texmf-config
  only if it is present. That should be due to the policy, but it still
  might happen that tex-common is not installed bug another package
  depending on it is tried to be removed (see bug #531581).
  (Closes: #530832)
* Remove the code in postrm that removes /usr/local/share/texmf/ls-R,
  we are not allowed to do that (policy), but we try to remove that 
  directory if it is empty. (Closes: #528021)


Modified: tex-common/trunk/debian/changelog
===================================================================
--- tex-common/trunk/debian/changelog	2009-06-04 20:10:52 UTC (rev 3994)
+++ tex-common/trunk/debian/changelog	2009-06-06 16:00:52 UTC (rev 3995)
@@ -1,3 +1,17 @@
+tex-common (1.19) unstable; urgency=low
+
+  * UNRELEASED
+  * change dh_installtex generated postrm code to call update-texmf-config
+    only if it is present. That should be due to the policy, but it still
+    might happen that tex-common is not installed bug another package
+    depending on it is tried to be removed (see bug #531581).
+    (Closes: #530832)
+  * Remove the code in postrm that removes /usr/local/share/texmf/ls-R,
+    we are not allowed to do that (policy), but we try to remove that 
+    directory if it is empty. (Closes: #528021)
+
+ -- Norbert Preining <preining at debian.org>  Sat, 06 Jun 2009 17:54:52 +0200
+
 tex-common (1.18) unstable; urgency=low
 
   * make sure that fmtutil-sys --all and updmap-sys are called on new

Modified: tex-common/trunk/debian/postrm.in
===================================================================
--- tex-common/trunk/debian/postrm.in	2009-06-04 20:10:52 UTC (rev 3994)
+++ tex-common/trunk/debian/postrm.in	2009-06-06 16:00:52 UTC (rev 3995)
@@ -35,8 +35,13 @@
     # purge texmf.cnf which is generated by update-texmf using ucf:
     purge_ucf_file  /etc/texmf/texmf.cnf
 
-    # remove the symlink in TEXMFLOCAL
-    rm -f /usr/local/share/texmf/ls-R 2>/dev/null || true
+    # try to remove /usr/local/share/texmf if it is empty
+    # people should normally not have TEXMFLOCAL ls-R files
+    # unless they called mktexlsr manually, in which case this is fine
+    # maintainer scripts should call mktexlsr with a list of trees so
+    # no /u/l/s/texmf/ls-R is created
+    #rm -f /usr/local/share/texmf/ls-R 2>/dev/null || true
+    rmdir --ignore-fail-on-non-empty /usr/local/share/texmf/ 2>/dev/null || true
     ;;
   *)
     ;;

Modified: tex-common/trunk/scripts/postrm-tex
===================================================================
--- tex-common/trunk/scripts/postrm-tex	2009-06-04 20:10:52 UTC (rev 3994)
+++ tex-common/trunk/scripts/postrm-tex	2009-06-06 16:00:52 UTC (rev 3995)
@@ -50,7 +50,15 @@
     remove|disappear)
         for i in #WHATTODO# ; do
             if [ "$i" = map ] ; then
-                update-texmf-config updmap
+                # it might happen that tex-common is not installed and
+                # still the postrm of a package is tried to be uninstalled
+                # so don't call update-texmf-config if not present
+                # See bug report #531581
+                if which update-texmf-config >/dev/null; then
+                    update-texmf-config updmap
+                else
+                    echo "update-texmf-config not present: is tex-common installed?" >&2
+                fi
                 #dhit_libkpathsea_configured && \
                 #    dhit_check_run_without_errors updmap-sys
             fi
@@ -66,7 +74,11 @@
                 done
             fi
             if [ "$i" = language ] ; then
-                update-texmf-config language
+                if which update-texmf-config >/dev/null; then
+                    update-texmf-config language
+                else
+                    echo "update-texmf-config not present: is tex-common installed?" >&2
+                fi
                 #if dhit_libkpathsea_configured && \
                 #    which fmtutil-sys >/dev/null; then
                 #    dhit_build_hyphen_format_if_format_exists \




More information about the Debian-tex-commits mailing list