delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2012/03/08/10:04:51

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-0.9 required=5.0 tests=AWL,BAYES_00,SPF_NEUTRAL,TW_GC,TW_MK,TW_YG,T_RP_MATCHES_RCVD
X-Spam-Check-By: sourceware.org
Message-ID: <4F58CA70.1040703@cornell.edu>
Date: Thu, 08 Mar 2012 10:04:16 -0500
From: Ken Brown <kbrown AT cornell DOT edu>
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:10.0.1) Gecko/20120208 Thunderbird/10.0.1
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Subject: Re: cygport: How to suppress automatic postinstall script additions
References: <4F54E12C DOT 4040502 AT cornell DOT edu> <1330962952 DOT 6988 DOT 1 DOT camel AT YAAKOV04> <1330968741 DOT 6988 DOT 13 DOT camel AT YAAKOV04> <4F54FEF3 DOT 4010704 AT cornell DOT edu> <1330982609 DOT 6988 DOT 22 DOT camel AT YAAKOV04> <4F554322 DOT 4060704 AT cornell DOT edu> <4F56030B DOT 3020101 AT cornell DOT edu> <4F564C16 DOT 6030504 AT cornell DOT edu>
In-Reply-To: <4F564C16.6030504@cornell.edu>
X-PMX-CORNELL-SPAM-CHECKED: Pawpaw
X-Original-Sender: kbrown AT cornell DOT edu - Thu Mar 8 10:04:22 2012
X-PMX-CORNELL-REASON: CU_White_List_Override
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

--------------070704040902000709060204
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

On 3/6/2012 12:40 PM, Ken Brown wrote:
> On 3/6/2012 7:28 AM, Ken Brown wrote:
>> On 3/5/2012 5:50 PM, Ken Brown wrote:
>>> On 3/5/2012 4:23 PM, Yaakov (Cygwin/X) wrote:
>>>> On Mon, 2012-03-05 at 12:59 -0500, Ken Brown wrote:
>>>>> On 3/5/2012 12:32 PM, Yaakov (Cygwin/X) wrote:
>>>>>> OK, here's the fix:
>>>>>>
>>>>>> 1) Install cygport-0.10.8.1-1 (released just moments ago).
>>>>>>
>>>>>> 2) Bump collection-basic to $today and build it with newly-downloaded
>>>>>> sources.
>>>>>>
>>>>>> 3) Bump collection-langcjk to $today, add 'jfontmaps' to ARCH_PKGS,
>>>>>> and
>>>>>> build with newly-downloaded sources.
>>>>>>
>>>>>> After installing the new collection-basic with the new postinstall
>>>>>> script, the aforementioned xetex test works.
>>>>>
>>>>> In your new postinstall script, I wonder if it would be better to
>>>>> delete
>>>>> /etc/texmf/web2c/updmap.cfg rather than editing it. The reason is that
>>>>> the master updmap.cfg in /usr/share/texmf/web2c may have changed
>>>>> due to
>>>>> the addition or deletion of TL packages containing fonts, and I don't
>>>>> think these changes get propagated to /etc/texmf/web2c/updmap.cfg.
>>>>
>>>> The problem with that is any settings in
>>>> TEXMFSYSCONFIG/web2c/updmap.cfg
>>>> would be lost. What about the attached patch for cygport?
>>>
>>> I won't have a chance to test it until tomorrow, but it looks good at
>>> first glance. One question: I don't see where you take account of fonts
>>> that might have been deleted. Shouldn't updmap-sys --syncwithtrees be
>>> run on every postinstall to catch these?
>>
>> I think it would be enough for texlive-collection-basic to have a custom
>> postinsall.sh that does this. There's no reason it has to be repeated by
>> every texlive-collection-* package.
>
> Forget this last suggestion. I think the attached patch to
> src_postinstall.cygpart does the right thing.

I've tested the patch in my previous email pretty extensively, and I'm 
pretty sure it's OK except for one detail:  The call to 
`/usr/bin/updmap-sys --nomkmap --enable $map' in the postinstall scripts 
should use the --nohash option.  I'm attaching a revised patch that does 
this.

The following 19 packages need to be updated (because they need to 
enable maps):

texlive-collection-basic
texlive-collection-context
texlive-collection-fontsextra
texlive-collection-fontsrecommended
texlive-collection-games
texlive-collection-langarabic
texlive-collection-langcjk
texlive-collection-langcyrillic
texlive-collection-langczechslovak
texlive-collection-langfrench
texlive-collection-langgreek
texlive-collection-langhebrew
texlive-collection-langindic
texlive-collection-langlithuanian
texlive-collection-langmongolian
texlive-collection-langpolish
texlive-collection-langvietnamese
texlive-collection-latex
texlive-collection-latexextra

I've rebuilt all of them and installed/uninstalled them in various 
combinations and couldn't find any problems involving fonts.

Before I update them in the distro, there's one other thing I thought of 
that the TeX Live postinstall scripts should be doing.  Shouldn't they 
call fc-cache whenever fonts are installed into 
usr/share/texmf-dist/fonts/opentype, 
usr/share/texmf-dist/fonts/truetype, or usr/share/texmf-dist/fonts/type1?

Ken


--------------070704040902000709060204
Content-Type: text/plain;
 name="src_postinst.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
 filename="src_postinst.patch"

--- src_postinst.cygpart.orig	2012-03-06 12:28:09.000000000 -0500
+++ src_postinst.cygpart	2012-03-08 09:30:08.116224600 -0500
@@ -263,21 +263,27 @@
 __prep_texlive() {
 	dodir /etc/postinstall
 	cat >> ${D}/etc/postinstall/${PN}.sh <<-_EOF
-		if [ -x /usr/bin/mktexlsr ] && \\
-		   [ ! -f /usr/share/texmf-dist/ls-R -o \\
+		if [ ! -f /usr/share/texmf-dist/ls-R -o \\
 		     \$(find /usr/share/texmf{,-dist} -mindepth 2 -type f -cnewer /usr/share/texmf-dist/ls-R 2>/dev/null | wc -l) -gt 0 ]
 		then
-		    /usr/bin/mktexlsr
-		    if test -f /etc/texmf/web2c/updmap.cfg; then
-		      /usr/bin/sed -i -e 's/^#! //g' /etc/texmf/web2c/updmap.cfg
-		    fi
-		    /usr/bin/updmap-sys --syncwithtrees
+			runfmtutil=1
+			/usr/bin/mktexlsr
+			/usr/bin/updmap-sys --syncwithtrees
+		fi
+		for map in $(__config_get texlive_updmaps)
+		do
+		   /usr/bin/updmap-sys --nomkmap --nohash --enable \$map
+		done
+		if [ -n "\$map" ]
+		then
 		    /usr/bin/updmap-sys --nohash
 		    /usr/bin/mktexlsr
+		fi
+		if [ -n "\$runfmtutil" ]
+		then
 		    /usr/bin/fmtutil-sys --all
 		    /usr/bin/mktexlsr
 		fi
-
 	_EOF
 }
 # end of conditional __prepetc helpers


--------------070704040902000709060204
Content-Type: text/plain; charset=us-ascii

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
--------------070704040902000709060204--

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019