<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugzilla.yoctoproject.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugzilla.yoctoproject.org/"
          
          maintainer="it-coreprojects-helpdesk@linuxfoundation.org"
>

    <bug>
          <bug_id>9155</bug_id>
          
          <creation_ts>2016-02-22 20:39:08 +0000</creation_ts>
          <short_desc>update_font_cache postinst failing with read-only filesystem</short_desc>
          <delta_ts>2016-03-17 22:11:50 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>7</classification_id>
          <classification>Build System, Metadata &amp; Runtime</classification>
          <product>OE-Core</product>
          <component>core</component>
          <version>unspecified</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          <see_also>https://bugzilla.yoctoproject.org/show_bug.cgi?id=9214</see_also>
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium+</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>2.1 M3</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Martin Jansa">Martin.Jansa</reporter>
          <assigned_to name="Martin Jansa">Martin.Jansa</assigned_to>
          <cc>meta.mr.watcher</cc>
    
    <cc>meta.watcher</cc>
    
    <cc>ross.burton</cc>
    
    <cc>sgw</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>Don&apos;t know</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>59347</commentid>
    <comment_count>0</comment_count>
    <who name="Martin Jansa">Martin.Jansa</who>
    <bug_when>2016-02-22 20:39:08 +0000</bug_when>
    <thetext>It was working fine with last time I&apos;ve checked with jethro, but now building any image with fonts with latest master fails.

And this postinst failure is fatal when the IMAGE_FEATURES also set such image as read-only (because the postinst script cannot be executed to create the cache during first boot)

The fc-cache output is pretty useless (even when executed manually):

OE @ ~/build/oe-core/tmp-glibc/work/qemux86-oe-linux/core-image-weston/1.0-r0/rootfs $ ../intercept_scripts/update_font_cache+ ../intercept_scripts/update_font_cache
FC_DEBUG=1
[/OE/build/oe-core/tmp-glibc/work/qemux86-oe-linux/core-image-weston/1.0-r0/rootfs]/usr/share/fonts: skipping, existing cache is valid: 0 fonts, 1 dirs
[/OE/build/oe-core/tmp-glibc/work/qemux86-oe-linux/core-image-weston/1.0-r0/rootfs]/usr/share/fonts/ttf: skipping, existing cache is valid: 12 fonts, 0 dirs
[/OE/build/oe-core/tmp-glibc/work/qemux86-oe-linux/core-image-weston/1.0-r0/rootfs]/usr/lib/X11/fonts: /usr/lib/X11/fonts: error scanning
Re-scanning [/OE/build/oe-core/tmp-glibc/work/qemux86-oe-linux/core-image-weston/1.0-r0/rootfs]/usr/share/fonts: caching, new cache contents: 0 fonts, 1 dirs
/OE/build/oe-core/tmp-glibc/work/qemux86-oe-linux/core-image-weston/1.0-r0/rootfs//var/cache/fontconfig: cleaning cache directory
/OE/build/oe-core/tmp-glibc/work/qemux86-oe-linux/core-image-weston/1.0-r0/rootfs/usr/bin/fc-cache: failed


Please set one of autobuilder targets to build read-only images so that these issues can be catched as soon as possible next time it gets broken.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>59348</commentid>
    <comment_count>1</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2016-02-22 20:40:18 +0000</bug_when>
    <thetext>Adding something to the selftest to verify that images are buildable without any delayed postinst would be good.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>59376</commentid>
    <comment_count>2</comment_count>
    <who name="Martin Jansa">Martin.Jansa</who>
    <bug_when>2016-02-23 13:16:06 +0000</bug_when>
    <thetext>NOTE: recipe core-image-weston-1.0-r0: task do_rootfs: Started
WARNING: core-image-weston-1.0-r0 do_rootfs: The postinstall intercept hook &apos;update_icon_cache&apos; failed (exit code: 1)! See log for details!
WARNING: core-image-weston-1.0-r0 do_rootfs: The postinstall intercept hook &apos;update_font_cache&apos; failed (exit code: 1)! See log for details!
ERROR: core-image-weston-1.0-r0 do_rootfs: The following packages could not be configured offline and rootfs is read-only: [&apos;liberation-fonts&apos;, &apos;libgdk-pixbuf-2.0-loader-png&apos;, &apos;adwaita-icon-theme-symbolic&apos;]
ERROR: core-image-weston-1.0-r0 do_rootfs: Function failed: do_rootfs
ERROR: Logfile of failure stored in: /OE/build/oe-core/tmp-glibc/work/qemux86-oe-linux/core-image-weston/1.0-r0/temp/log.do_rootfs.15093

With FC_DEBUG=16 it shows a bit more info:

OE @ ~/build/oe-core/tmp-glibc/work/qemux86-oe-linux/core-image-weston/1.0-r0/rootfs $ qemu-i386 -r 2.6.32 -L /OE/build/oe-core/tmp-glibc/work/qemux86-oe-linux/core-image-weston/1.0-r0/rootfs -E LD_LIBRARY_PATH=/OE/build/oe-core/tmp-glibc/work/qemux86-oe-linux/core-image-weston/1.0-r0/rootfs//usr/lib:/OE/build/oe-core/tmp-glibc/work/qemux86-oe-linux/core-image-weston/1.0-r0/rootfs//lib -E FC_DEBUG=16 /OE/build/oe-core/tmp-glibc/work/qemux86-oe-linux/core-image-weston/1.0-r0/rootfs/usr/bin/fc-cache --sysroot=/OE/build/oe-core/tmp-glibc/work/qemux86-oe-linux/core-image-weston/1.0-r0/rootfs --system-only
FC_DEBUG=16
FcCacheTimeValid dir &quot;/usr/share/fonts&quot; cache checksum 1456232724 dir checksum 1456232724
/OE/build/oe-core/tmp-glibc/work/qemux86-oe-linux/core-image-weston/1.0-r0/rootfs//usr/share/fonts: cache: 1, fs: 1
FcCacheTimeValid dir &quot;/usr/share/fonts/ttf&quot; cache checksum 1456232724 dir checksum 1456232724
/OE/build/oe-core/tmp-glibc/work/qemux86-oe-linux/core-image-weston/1.0-r0/rootfs//usr/share/fonts/ttf: cache: 0, fs: 0
FcCacheTimeValid dir &quot;/usr/share/fonts&quot; cache checksum 1456232724 dir checksum 1456232724
/OE/build/oe-core/tmp-glibc/work/qemux86-oe-linux/core-image-weston/1.0-r0/rootfs//usr/share/fonts: cache: 1, fs: 1
FcCacheTimeValid dir &quot;/usr/share/fonts/ttf&quot; cache checksum 1456232724 dir checksum 1456232724
/OE/build/oe-core/tmp-glibc/work/qemux86-oe-linux/core-image-weston/1.0-r0/rootfs//usr/share/fonts/ttf: cache: 0, fs: 0
/usr/lib/X11/fonts: error scanning
FcCacheTimeValid dir &quot;/usr/share/fonts&quot; cache checksum 1456232724 dir checksum 1456232724
/OE/build/oe-core/tmp-glibc/work/qemux86-oe-linux/core-image-weston/1.0-r0/rootfs//usr/share/fonts: cache: 1, fs: 1
FcDirCacheWriteDir dir &quot;/usr/share/fonts&quot; file &quot;/OE/build/oe-core/tmp-glibc/work/qemux86-oe-linux/core-image-weston/1.0-r0/rootfs/var/cache/fontconfig//3830d5c3ddfd5cd38a049b759396e72e-le32d4.cache-6&quot;
Created CACHEDIR.TAG at /OE/build/oe-core/tmp-glibc/work/qemux86-oe-linux/core-image-weston/1.0-r0/rootfs//var/cache/fontconfig
/OE/build/oe-core/tmp-glibc/work/qemux86-oe-linux/core-image-weston/1.0-r0/rootfs//var/cache/fontconfig: cleaning cache directory
FcCacheTimeValid dir &quot;/usr/share/fonts&quot; cache checksum 1456232724 dir checksum 1456232724
/OE/build/oe-core/tmp-glibc/work/qemux86-oe-linux/core-image-weston/1.0-r0/rootfs//usr/share/fonts: cache: 1, fs: 1
FcCacheTimeValid dir &quot;/usr/share/fonts/ttf&quot; cache checksum 1456232724 dir checksum 1456232724
/OE/build/oe-core/tmp-glibc/work/qemux86-oe-linux/core-image-weston/1.0-r0/rootfs//usr/share/fonts/ttf: cache: 0, fs: 0

There is no usr/lib/X11/fonts in the image, but maybe it&apos;s scanning the hosts filesystem? Other paths are prefixed with rootfs path.

OE @ ~/build/oe-core/tmp-glibc/work/qemux86-oe-linux/core-image-weston/1.0-r0/rootfs $ find usr/lib/X11/fonts
find: &apos;usr/lib/X11/fonts&apos;: No such file or directory</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>59377</commentid>
    <comment_count>3</comment_count>
    <who name="Martin Jansa">Martin.Jansa</who>
    <bug_when>2016-02-23 14:06:02 +0000</bug_when>
    <thetext>I&apos;ve tried to revert last 3 fontconfig changes
027ba09 Revert &quot;fontconfig: Upgrade to 2.11.93&quot;
740682d Revert &quot;fontconfig: Fix pkgconfig file generation to not have absolute paths&quot;
5843264 Revert &quot;fontconfig: Upgrade 2.11.93 -&gt; 2.11.94&quot;

and it didn&apos;t help</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>59378</commentid>
    <comment_count>4</comment_count>
    <who name="Martin Jansa">Martin.Jansa</who>
    <bug_when>2016-02-23 14:10:19 +0000</bug_when>
    <thetext>As work around you can create usr/lib/X11/fonts (it&apos;s empty in weston image), then it doesn&apos;t fail

OE @ ~/build/oe-core/tmp-glibc/work/qemux86-oe-linux/core-image-weston/1.0-r0/rootfs $ mkdir usr/lib/X11
OE @ ~/build/oe-core/tmp-glibc/work/qemux86-oe-linux/core-image-weston/1.0-r0/rootfs $ cp -ra usr/share/fonts/ usr/lib/X11/fonts
OE @ ~/build/oe-core/tmp-glibc/work/qemux86-oe-linux/core-image-weston/1.0-r0/rootfs $ qemu-i386 -r 2.6.32 -L /OE/build/oe-core/tmp-glibc/work/qemux86-oe-linux/core-image-weston/1.0-r0/rootfs -E LD_LIBRARY_PATH=/OE/build/oe-core/tmp-glibc/work/qemux86-oe-linux/core-image-weston/1.0-r0/rootfs//usr/lib:/OE/build/oe-core/tmp-glibc/work/qemux86-oe-linux/core-image-weston/1.0-r0/rootfs//lib -E FC_DEBUG=16 /OE/build/oe-core/tmp-glibc/work/qemux86-oe-linux/core-image-weston/1.0-r0/rootfs/usr/bin/fc-cache --sysroot=/OE/build/oe-core/tmp-glibc/work/qemux86-oe-linux/core-image-weston/1.0-r0/rootfs --system-only -vf
FC_DEBUG=16
FcCacheTimeValid dir &quot;/usr/share/fonts&quot; cache checksum 1456232724 dir checksum 1456232724
/OE/build/oe-core/tmp-glibc/work/qemux86-oe-linux/core-image-weston/1.0-r0/rootfs//usr/share/fonts: cache: 1, fs: 1
FcDirCacheWriteDir dir &quot;/usr/lib/X11/fonts&quot; file &quot;/OE/build/oe-core/tmp-glibc/work/qemux86-oe-linux/core-image-weston/1.0-r0/rootfs/var/cache/fontconfig//983f9ea3cd1b62854d3a0538dc38ca90-le32d4.cache-6&quot;
FcCacheTimeValid dir &quot;/usr/share/fonts/ttf&quot; cache checksum 1456232724 dir checksum 1456232724
/OE/build/oe-core/tmp-glibc/work/qemux86-oe-linux/core-image-weston/1.0-r0/rootfs//usr/share/fonts/ttf: cache: 0, fs: 0

charsets 12 -&gt; 4 leaves 164 -&gt; 16
FcDirCacheWriteDir dir &quot;/usr/lib/X11/fonts/ttf&quot; file &quot;/OE/build/oe-core/tmp-glibc/work/qemux86-oe-linux/core-image-weston/1.0-r0/rootfs/var/cache/fontconfig//f31dea61cee4bc0f078bd14628df7c7f-le32d4.cache-6&quot;
[/OE/build/oe-core/tmp-glibc/work/qemux86-oe-linux/core-image-weston/1.0-r0/rootfs]/usr/share/fonts: FcDirCacheWriteDir dir &quot;/usr/share/fonts&quot; file &quot;/OE/build/oe-core/tmp-glibc/work/qemux86-oe-linux/core-image-weston/1.0-r0/rootfs/var/cache/fontconfig//3830d5c3ddfd5cd38a049b759396e72e-le32d4.cache-6&quot;
caching, new cache contents: 0 fonts, 1 dirs
[/OE/build/oe-core/tmp-glibc/work/qemux86-oe-linux/core-image-weston/1.0-r0/rootfs]/usr/share/fonts/ttf: 
charsets 12 -&gt; 4 leaves 164 -&gt; 16
FcDirCacheWriteDir dir &quot;/usr/share/fonts/ttf&quot; file &quot;/OE/build/oe-core/tmp-glibc/work/qemux86-oe-linux/core-image-weston/1.0-r0/rootfs/var/cache/fontconfig//94322f4d3cdf1bd54794b691285ca062-le32d4.cache-6&quot;
caching, new cache contents: 12 fonts, 0 dirs
[/OE/build/oe-core/tmp-glibc/work/qemux86-oe-linux/core-image-weston/1.0-r0/rootfs]/usr/lib/X11/fonts: FcDirCacheWriteDir dir &quot;/usr/lib/X11/fonts&quot; file &quot;/OE/build/oe-core/tmp-glibc/work/qemux86-oe-linux/core-image-weston/1.0-r0/rootfs/var/cache/fontconfig//983f9ea3cd1b62854d3a0538dc38ca90-le32d4.cache-6&quot;
caching, new cache contents: 0 fonts, 1 dirs
[/OE/build/oe-core/tmp-glibc/work/qemux86-oe-linux/core-image-weston/1.0-r0/rootfs]/usr/lib/X11/fonts/ttf: 
charsets 12 -&gt; 4 leaves 164 -&gt; 16
FcDirCacheWriteDir dir &quot;/usr/lib/X11/fonts/ttf&quot; file &quot;/OE/build/oe-core/tmp-glibc/work/qemux86-oe-linux/core-image-weston/1.0-r0/rootfs/var/cache/fontconfig//f31dea61cee4bc0f078bd14628df7c7f-le32d4.cache-6&quot;
caching, new cache contents: 12 fonts, 0 dirs
Re-scanning [/OE/build/oe-core/tmp-glibc/work/qemux86-oe-linux/core-image-weston/1.0-r0/rootfs]/usr/share/fonts: FcCacheTimeValid dir &quot;/usr/share/fonts&quot; cache checksum 1456232724 dir checksum 1456232724
/OE/build/oe-core/tmp-glibc/work/qemux86-oe-linux/core-image-weston/1.0-r0/rootfs//usr/share/fonts: cache: 1, fs: 1
FcDirCacheWriteDir dir &quot;/usr/share/fonts&quot; file &quot;/OE/build/oe-core/tmp-glibc/work/qemux86-oe-linux/core-image-weston/1.0-r0/rootfs/var/cache/fontconfig//3830d5c3ddfd5cd38a049b759396e72e-le32d4.cache-6&quot;
caching, new cache contents: 0 fonts, 1 dirs
Re-scanning [/OE/build/oe-core/tmp-glibc/work/qemux86-oe-linux/core-image-weston/1.0-r0/rootfs]/usr/lib/X11/fonts: FcCacheTimeValid dir &quot;/usr/lib/X11/fonts&quot; cache checksum 1456232724 dir checksum 1456232724
/OE/build/oe-core/tmp-glibc/work/qemux86-oe-linux/core-image-weston/1.0-r0/rootfs//usr/lib/X11/fonts: cache: 1, fs: 1
FcDirCacheWriteDir dir &quot;/usr/lib/X11/fonts&quot; file &quot;/OE/build/oe-core/tmp-glibc/work/qemux86-oe-linux/core-image-weston/1.0-r0/rootfs/var/cache/fontconfig//983f9ea3cd1b62854d3a0538dc38ca90-le32d4.cache-6&quot;
caching, new cache contents: 0 fonts, 1 dirs
Created CACHEDIR.TAG at /OE/build/oe-core/tmp-glibc/work/qemux86-oe-linux/core-image-weston/1.0-r0/rootfs//var/cache/fontconfig
/OE/build/oe-core/tmp-glibc/work/qemux86-oe-linux/core-image-weston/1.0-r0/rootfs//var/cache/fontconfig: cleaning cache directory
FcCacheTimeValid dir &quot;/usr/lib/X11/fonts&quot; cache checksum 1456232724 dir checksum 1456232724
/OE/build/oe-core/tmp-glibc/work/qemux86-oe-linux/core-image-weston/1.0-r0/rootfs//usr/lib/X11/fonts: cache: 1, fs: 1
FcCacheTimeValid dir &quot;/usr/share/fonts&quot; cache checksum 1456232724 dir checksum 1456232724
/OE/build/oe-core/tmp-glibc/work/qemux86-oe-linux/core-image-weston/1.0-r0/rootfs//usr/share/fonts: cache: 1, fs: 1
FcCacheTimeValid dir &quot;/usr/lib/X11/fonts/ttf&quot; cache checksum 1456232724 dir checksum 1456232724
/OE/build/oe-core/tmp-glibc/work/qemux86-oe-linux/core-image-weston/1.0-r0/rootfs//usr/lib/X11/fonts/ttf: cache: 0, fs: 0
FcCacheTimeValid dir &quot;/usr/share/fonts/ttf&quot; cache checksum 1456232724 dir checksum 1456232724
/OE/build/oe-core/tmp-glibc/work/qemux86-oe-linux/core-image-weston/1.0-r0/rootfs//usr/share/fonts/ttf: cache: 0, fs: 0
/OE/build/oe-core/tmp-glibc/work/qemux86-oe-linux/core-image-weston/1.0-r0/rootfs/usr/bin/fc-cache: succeeded
OE @ ~/build/oe-core/tmp-glibc/work/qemux86-oe-linux/core-image-weston/1.0-r0/rootfs $ echo $?
0</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>59379</commentid>
    <comment_count>5</comment_count>
    <who name="Martin Jansa">Martin.Jansa</who>
    <bug_when>2016-02-23 14:11:56 +0000</bug_when>
    <thetext>Even better, remove
&lt;dir&gt;/usr/lib/X11/fonts&lt;/dir&gt;
from
/etc/fonts/fonts.conf
when DISTRO_FEATURES don&apos;t have x11</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>59390</commentid>
    <comment_count>6</comment_count>
    <who name="Martin Jansa">Martin.Jansa</who>
    <bug_when>2016-02-23 15:43:39 +0000</bug_when>
    <thetext>Fix sent to ML:
http://lists.openembedded.org/pipermail/openembedded-core/2016-February/117926.html</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>60122</commentid>
    <comment_count>7</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2016-03-17 22:11:50 +0000</bug_when>
    <thetext>Fixed in oe-core 8cc47e6bfb7f623711d9cd9e71a7f72ab2838f57</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>