[Debian-tex-commits] SVN tex-common commit + diffs: r4884 - tex-common/trunk/debian
Norbert Preining
preining at alioth.debian.org
Thu Jun 30 23:24:18 UTC 2011
Author: preining
Date: 2011-06-30 23:24:17 +0000 (Thu, 30 Jun 2011)
New Revision: 4884
Modified:
tex-common/trunk/debian/changelog
tex-common/trunk/debian/postinst.in
Log:
add mtxrun --generate calls to the mktexlsr trigger action
if context is installed
Modified: tex-common/trunk/debian/changelog
===================================================================
--- tex-common/trunk/debian/changelog 2011-06-30 23:04:46 UTC (rev 4883)
+++ tex-common/trunk/debian/changelog 2011-06-30 23:24:17 UTC (rev 4884)
@@ -1,3 +1,11 @@
+tex-common (2.11~1) unstable; urgency=low
+
+ * UNRELEASED
+ * add calls to mtxrun --generate to the mktexlsr trigger action
+ in case context is installed
+
+ -- Norbert Preining <preining at debian.org> Fri, 01 Jul 2011 08:23:17 +0900
+
tex-common (2.10) unstable; urgency=low
[ Norbert Preining ]
Modified: tex-common/trunk/debian/postinst.in
===================================================================
--- tex-common/trunk/debian/postinst.in 2011-06-30 23:04:46 UTC (rev 4883)
+++ tex-common/trunk/debian/postinst.in 2011-06-30 23:24:17 UTC (rev 4884)
@@ -36,6 +36,51 @@
# <:open(FUNCTIONS,'debian/common.functions');@FUNCTIONS=<FUNCTIONS>;close(FUNCTIONS):>//
# <:=@FUNCTIONS:>//
+
+run_mtxrun_if_possible()
+{
+ # code from postinst-tex
+ if dhit_libkpathsea_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
+ # all necessary basic files are present
+ #
+ # dpkg-query has two defects wrt not existing packages
+ # - it is noisy to stderr
+ # - it returns 1
+ # so shut both errors up
+ stat=$(dpkg-query -W -f='${Status}' context 2>/dev/null || true)
+ case "$stat" in
+ "install ok installed")
+ do_it=1
+ ;;
+ *)
+ do_it=0
+ ;;
+ esac
+ if [ "$do_it" = 0 ] ; then
+ : don't do anything here, we do not want to be noisy
+ else
+ tempfile=$(mktemp -p /tmp mtxrun.XXXXXXXX)
+ printf "Running mtxrun --generate. This may take some time... "
+ if mtxrun --generate > $tempfile 2>&1 ; then
+ rm -f $tempfile
+ echo "done."
+ else
+ exec >&2
+ echo
+ echo "mtxrun --generate failed. Output has been stored in"
+ echo "$tempfile"
+ echo "Please include this file if you report a bug."
+ echo
+ exit 1
+ fi
+ fi
+ fi
+ fi
+}
+
do_triggers()
{
DONE_FULL_LSR=0
@@ -80,6 +125,7 @@
fi
fi
fi
+ run_mtxrun_if_possible
;;
esac
# do NOT merge these two cases into one, from dpkg's trigger.txt:
@@ -110,6 +156,7 @@
fi
fi
fi
+ run_mtxrun_if_possible
;;
esac
# do NOT merge these two cases into one, from dpkg's trigger.txt:
More information about the Debian-tex-commits
mailing list