cygport patches for TeX Live

Ken Brown kbrown@cornell.edu
Tue Dec 16 23:08:00 GMT 2014


On 12/16/2014 5:49 PM, Ken Brown wrote:
> Now that setup.exe supports perpetual postinstall scripts, I'd like to
> streamline the TeX Live postinstall process.  I'm attaching two perpetual
> postinstall scripts that I'd like to use (one before the ordinary postinstall
> scripts and one after), as well as four cygport patches.
>
> With these changes, I was able to reduce the total postinstall time for a
> complete TeX Live install from 48 minutes to 14 minutes on my system.
>
> Here's a summary of the changes and the reasons for them.
>
> 1. The most time-consuming command in the current postinstall process is
> mktexlsr, which is run many times.  The proposed changes reduce this to one
> call, at the beginning; all remaining postinstall commands keep the ls-R files
> up to date at minimal cost.
>
> 2. Another somewhat time-consuming command is updmap.  Each call (even just to
> enable or disable a map) takes at least 2-3 seconds.  If several maps are
> enabled/disabled at once, there's no noticeable increase in time.  The proposed
> changes use just one call to updmap to enable all maps.
>
> 3. Similarly, there are a lot of unnecessary calls to fc-cache.  I've reduced
> that to a single call, at the end.
>
> I'm open to suggestions as to better ways to do all this.

Sorry, there was a stupid mistake in one of the patches.  The corrected one is 
attached.

Ken
-------------- next part --------------
>From 8b7624d5d064bc19c4a513592d0d559201c648c0 Mon Sep 17 00:00:00 2001
From: Ken Brown <kbrown@cornell.edu>
Date: Wed, 26 Nov 2014 07:35:13 -0500
Subject: [PATCH 2/4] prep_texlive: remove calls to mktexlsr

Instead create a marker file in /etc/texmf/postinstall indicating that
mktexlsr should be run by a perpetual postinstall script.
---
 lib/src_postinst.cygpart | 10 ++--------
 1 file changed, 2 insertions(+), 8 deletions(-)

diff --git a/lib/src_postinst.cygpart b/lib/src_postinst.cygpart
index 86870f5..a769ffc 100644
--- a/lib/src_postinst.cygpart
+++ b/lib/src_postinst.cygpart
@@ -328,11 +328,9 @@ __prep_mateconf_schemas() {
 __prep_texlive() {
 	local d fmt fmts map maps
 
-	dodir /etc/postinstall /etc/preremove
+	dodir /etc/postinstall /etc/preremove /etc/texmf/postinstall
 
-	cat >> ${D}/etc/postinstall/${PN}.sh <<-_EOF
-		/usr/bin/mktexlsr
-	_EOF
+	/usr/bin/touch ${D}/etc/texmf/postinstall/${PN}.lsr
 
 	fmts=$(__config_get texlive_fmts)
 	maps=$(__config_get texlive_maps)
@@ -351,7 +349,6 @@ __prep_texlive() {
 		cat >> ${D}/etc/postinstall/${PN}.sh <<-_EOF
 			/usr/bin/updmap-sys --nohash --syncwithtrees
 			/usr/bin/updmap-sys --nohash
-			/usr/bin/mktexlsr
 		_EOF
 	fi
 	if [ -n "${fmts#0}" ]
@@ -366,9 +363,6 @@ __prep_texlive() {
 				/usr/bin/fmtutil-sys --disablefmt $fmt
 			_EOF
 		done
-		cat >> ${D}/etc/postinstall/${PN}.sh <<-_EOF
-			/usr/bin/mktexlsr
-		_EOF
 	fi
 
 	for d in /usr/share/texmf-dist/fonts/{opentype,truetype,type1}
-- 
2.1.1



More information about the Cygwin-apps mailing list