postinstall: fontconfig abnormal exit

Ken Brown kbrown@cornell.edu
Fri Sep 11 19:47:14 GMT 2020


On 9/11/2020 10:41 AM, Marco Atzeri via Cygwin wrote:
> On 11.09.2020 15:12, Ken Brown via Cygwin wrote:
>> On 9/11/2020 7:31 AM, Marco Atzeri via Cygwin wrote:
>>> On 11.09.2020 10:32, Hamish McIntyre-Bhatty via Cygwin wrote:
>>>> On 11/09/2020 08:22, Fergus Daly via Cygwin wrote:
>>>>>> On 2020-09-10 04:57, Fergus Daly via Cygwin wrote:
>>>>>>>>>> Sorry if this has been asked 4 million times already.
> 
>>>
>>> Installing just base+fontconfig is not providing any error,
>>> so it must be an interaction of fontconfig with some other package
>>
>> You can reproduce the problem by doing a fresh install and choosing 
>> libfontconfig-common and libxml2.  setup.log.full shows
>>
>> running: C:\cygwin64temp\bin\bash.exe --norc --noprofile 
>> "/etc/postinstall/fontconfig_dtd.sh"
>> could not open /etc/xml/catalog for saving
>>
>> Marco, libxml2 used to have a postinstall script that would create 
>> /etc/xml/catalog:
>>
>> $ cat /etc/postinstall/libxml2.sh.done
>> if test ! -f /etc/xml/catalog; then
>>          /bin/mkdir -p /etc/xml
>>          /usr/bin/xmlcatalog --noout --create /etc/xml/catalog
>> fi
>>
>> But this seems to have disappeared from the most recent release.
> 
> noted.
> libxml2-2.9.10-2 on the build stage

Unfortunately, this doesn't yet fix the problem with fontconfig_dtd.sh.  The 
latter will now succeed if it is run after libxml2.sh, but not if it is run 
first.  I'm not aware of any way to force setup to run one postinstall script 
before another.  So maybe fontconfig_dtd.sh should be modified to include the 
contents of libxml2.sh, like this:

$ cat fontconfig_dtd.sh
if [ -x /usr/bin/xmlcatalog ] ; then
     if [ ! -f /etc/xml/catalog ] ; then
         /bin/mkdir -p /etc/xml
         /usr/bin/xmlcatalog --noout --create /etc/xml/catalog
     fi
     /usr/bin/xmlcatalog --noout --add "system" "fonts.dtd" 
/usr/share/xml/fontconfig/fonts.dtd /etc/xml/catalog
fi

I can do a non-maintainer update of fontconfig that makes this change if people 
agree that it's a good idea.

Ken


More information about the Cygwin mailing list