[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[tex-common] 04/04: check for texlive-binaries being configured, not kpsewhich running



This is an automated email from the git hooks/post-receive script.

preining pushed a commit to branch experimental
in repository tex-common.

commit c34f74a7feefaa537ce95edcf4a53d084377ac95
Author: Norbert Preining <preining@debian.org>
Date:   Thu May 22 10:54:49 2014 +0900

    check for texlive-binaries being configured, not kpsewhich running
---
 debian/changelog     |  9 ++++++---
 debian/postinst      | 43 ++++++++++++++++++++++---------------------
 scripts/postinst-tex | 18 +++++++++++++++---
 3 files changed, 43 insertions(+), 27 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index f1084dd..0833c41 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,12 +1,15 @@
 tex-common (5.00) experimental; urgency=low
 
   * fix man page of update-updmap (Closes: #717070)
-  * check for proper installation of texlive-binaries before calling
-    mtxrun, otherwise we might have a broken luatex
+  * exchange the check for kpsewhich running with a check for
+    texlive-binaries being installed/configured. Otherwise we might
+    run into library upgrade problems (missing symbols due to missing
+    so bump upstream). This is done both in the debian/postinst as
+    well as the postinst-tex code for dh_installtex.
   * only call mktexlsr for tl/texmf-dist tree, the tl/texmf tree is gone
   * bump standards to 3.9.5, no changes necessary
 
- -- Norbert Preining <preining@debian.org>  Thu, 22 May 2014 10:25:31 +0900
+ -- Norbert Preining <preining@debian.org>  Thu, 22 May 2014 10:53:13 +0900
 
 tex-common (4.04) unstable; urgency=low
 
diff --git a/debian/postinst b/debian/postinst
index 0cc039d..5082dda 100644
--- a/debian/postinst
+++ b/debian/postinst
@@ -28,7 +28,7 @@ umask 022
 # definitions of necessary trees
 TEXMFSYSVARDIR=/var/lib/texmf
 TEXMFTREES="/usr/share/texmf $TEXMFSYSVARDIR"
-FULLTEXMFTREES="$TEXMFTREES /usr/share/texlive/texmf /usr/share/texlive/texmf-dist"
+FULLTEXMFTREES="$TEXMFTREES /usr/share/texlive/texmf-dist"
 
 # summary of how this script can be called:
 #        * <postinst> `configure' <most-recently-configured-version>
@@ -54,9 +54,21 @@ cleanup()
   exit $rc
 }
 
-dhit_libkpathsea_configured ()
+dhit_texlive_binaries_configured ()
 {
-    kpsewhich --version >/dev/null 2>&1
+    # unfortunately this seems not to work anymore, we have to make
+    # sure that texlive-binaries is properly configured, otherwise
+    # a squeeze in libkpathsea and engines might occur
+    # kpsewhich --version >/dev/null 2>&1
+    stat=$(dpkg-query -W -f='${Status}' texlive-binaries 2>/dev/null || true)
+    case "$stat" in
+        "install ok installed")
+            return 0
+            ;;
+        *)
+            return 1
+            ;;
+    esac
 }
 
 dhit_build_format ()
@@ -81,7 +93,7 @@ dhit_build_format ()
 run_mtxrun_if_possible()
 {
     # code from postinst-tex
-    if dhit_libkpathsea_configured; then
+    if dhit_texlive_binaries_configured; then
         if which mtxrun >/dev/null; then
             # we also have to check that texlive-base is installed
             # and configured, otherwise we cannot be sure that
@@ -100,17 +112,6 @@ run_mtxrun_if_possible()
                     do_it=0
                     ;;
             esac
-            # we also need to make sure that texlive-binaries are correctly
-            # installed, otherwise luatex (called by mtxrun) might not work
-            stat=$(dpkg-query -W -f='${Status}' texlive-binaries 2>/dev/null || true)
-            case "$stat" in
-                "install ok installed")
-                    do_it=1
-                    ;;
-                *)
-                    do_it=0
-                    ;;
-            esac
             if [ "$do_it" = 1 ] ; then
                 tempfile=$(mktemp -p /tmp mtxrun.XXXXXXXX)
                 printf "Running mtxrun --generate. This may take some time... "
@@ -157,7 +158,7 @@ do_triggers()
     case " $trigger " in
         *" texmf-lsrfull "*)
             # code from postinst-tex
-            if dhit_libkpathsea_configured; then
+            if dhit_texlive_binaries_configured; then
                 # mktexlsr may not be present
                 if which mktexlsr >/dev/null; then
                     tempfile=$(mktemp -p /tmp mktexlsr.XXXXXXXX)
@@ -191,7 +192,7 @@ do_triggers()
           # only to lsr if we haven't done lsrfull
           if [ $DONE_FULL_LSR = 0 ] ; then
             # code from postinst-tex
-            if dhit_libkpathsea_configured; then
+            if dhit_texlive_binaries_configured; then
                 # mktexlsr may not be present
                 if which mktexlsr >/dev/null; then
                     tempfile=$(mktemp -p /tmp mktexlsr.XXXXXXXX)
@@ -223,7 +224,7 @@ do_triggers()
     case " $trigger " in
         *" texmf-map "*) 
          # code from postinst-tex
-         if dhit_libkpathsea_configured; then
+         if dhit_texlive_binaries_configured; then
              if which updmap-sys >/dev/null; then
                     # we also have to check that texlive-base is installed
                     # and configured, otherwise we cannot be sure that
@@ -252,7 +253,7 @@ do_triggers()
                         # see bug report #607857
                         # instead of that we call mktexlsr $TEXMFSYSVARDIR 
                         # afterwards. This can be done without checks as
-                        # we know that dhit_libkpathsea_configured and
+                        # we know that dhit_texlive_binaries_configured and
                         # since mktexlsr and updmap are in the same package
                         # and we checked for updmap already
                         if updmap-sys --nohash > $tempfile 2>&1 ; then
@@ -295,7 +296,7 @@ do_triggers()
     # postinst will often be called for several triggers at once.
     case " $trigger " in
         *" texmf-hyphen "*) 
-          if dhit_libkpathsea_configured; then
+          if dhit_texlive_binaries_configured; then
             if which kpsewhich >/dev/null; then
               if which fmtutil-sys >/dev/null; then
                 # code from postinst.tex
@@ -396,7 +397,7 @@ case $action in
     # we also have to check that texlive-base is installed
     # and configured, otherwise we cannot be sure that
     # all necessary basic files are present
-    if dhit_libkpathsea_configured; then
+    if dhit_texlive_binaries_configured; then
         # see above for information on dpkg-query usage
         stat=$(dpkg-query -W -f='${Status}' texlive-base  2>/dev/null || true)
         case "$stat" in
diff --git a/scripts/postinst-tex b/scripts/postinst-tex
index be32827..f3b1f21 100644
--- a/scripts/postinst-tex
+++ b/scripts/postinst-tex
@@ -22,9 +22,21 @@ FULLTEXMFTREES="$TEXMFTREES /usr/share/texlive/texmf-dist"
 #   1. kpsewhich is installed and;
 #
 #   2. libkpathsea is configured.
-dhit_libkpathsea_configured ()
+dhit_texlive_binaries_configured ()
 {
-    kpsewhich --version >/dev/null 2>&1
+    # unfortunately this seems not to work anymore, we have to make
+    # sure that texlive-binaries is properly configured, otherwise
+    # a squeeze in libkpathsea and engines might occur
+    # kpsewhich --version >/dev/null 2>&1
+    stat=$(dpkg-query -W -f='${Status}' texlive-binaries 2>/dev/null || true)
+    case "$stat" in
+        "install ok installed")
+            return 0
+            ;;
+        *)
+            return 1
+            ;;
+    esac
 }
 
 dhit_update_lsr_files ()
@@ -95,7 +107,7 @@ case "$1" in
         update-fmtutil
         # All of the following needs an installed and configured
         # basic TeX system, so check this.
-        if dhit_libkpathsea_configured; then
+        if dhit_texlive_binaries_configured; then
             #
             # if we are doing something with formats we have to update
             # the lsr database first

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-tex/tex-common.git


Reply to: