<?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>13040</bug_id>
          
          <creation_ts>2018-11-26 15:48:54 +0000</creation_ts>
          <short_desc>Error in  dconf postinstall script</short_desc>
          <delta_ts>2018-12-01 19:24:41 +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>2.6</version>
          <rep_platform>All</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Undecided</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Pablo Saavedra">psaavedra</reporter>
          <assigned_to name="Ross Burton">ross.burton</assigned_to>
          <cc>meta.mr.watcher</cc>
    
    <cc>meta.watcher</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>No (bug/feature does not impact docs)</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>82318</commentid>
    <comment_count>0</comment_count>
    <who name="Pablo Saavedra">psaavedra</who>
    <bug_when>2018-11-26 15:48:54 +0000</bug_when>
    <thetext>{{{
D: %post(dconf-0.28.0-r0.core2_64): execv(/bin/sh) pid 60436
+ set -e
+ glib-compile-schemas /home/psaavedra/yocto/build/tmp/work/genericx86_64-poky-linux/core-image-sato/1.0-r0/rootfs/usr/share/glib-2.0/schemas
Error opening directory “/home/psaavedra/yocto/build/tmp/work/genericx86_64-poky-linux/core-image-sato/1.0-r0/rootfs/usr/share/glib-2.0/schemas”: No such file or directory
D: %post(dconf-0.28.0-r0.core2_64): waitpid(60436) rc 60436 status 100
warning: %post(dconf-0.28.0-r0.core2_64) scriptlet failed, exit status 1
}}}


How to reproduce it:

{{{
IMAGE_INSTALL_append = &quot; \
    onboard \
&quot;
}}}



{{{
$ bitbake core-image-sato
Loaded 3087 entries from dependency cache.
NOTE: Resolving any missing task queue dependencies

Build Configuration:
BB_VERSION           = &quot;1.40.0&quot;
BUILD_SYS            = &quot;x86_64-linux&quot;
NATIVELSBSTRING      = &quot;universal&quot;
TARGET_SYS           = &quot;x86_64-poky-linux&quot;
MACHINE              = &quot;genericx86-64&quot;
DISTRO               = &quot;poky&quot;
DISTRO_VERSION       = &quot;2.6+snapshot-20181126&quot;
TUNE_FEATURES        = &quot;m64 core2&quot;
TARGET_FPU           = &quot;&quot;
meta
meta-poky
meta-yocto-bsp       = &quot;master:3786729785f4d5a762d4f8883c7fe8d020e17bf0&quot;
meta-oe
meta-python
meta-networking
...
ERROR: core-image-sato-1.0-r0 do_rootfs: Postinstall scriptlets of [&apos;dconf&apos;] have failed. If the intention is to defer them to first boot,
then please place them into pkg_postinst_ontarget_${PN} ().
Deferring to first boot via &apos;exit 1&apos; is no longer supported.
Details of the failure are in /home/psaavedra/yocto/build/tmp/work/genericx86_64-poky-linux/core-image-sato/1.0-r0/temp/log.do_rootfs.
ERROR: core-image-sato-1.0-r0 do_rootfs: Function failed: do_rootfs
ERROR: Logfile of failure stored in: /home/psaavedra/yocto/build/tmp/work/genericx86_64-poky-linux/core-image-sato/1.0-r0/temp/log.do_rootfs.42620
ERROR: Task (/home/psaavedra/yocto/sources/poky/meta/recipes-sato/images/core-image-sato.bb:do_rootfs) failed with exit code &apos;1&apos;
NOTE: Tasks Summary: Attempted 6461 tasks of which 6440 didn&apos;t need to be rerun and 1 failed.
}}}



I was able to skip this error with this patch but I afraid this doesn&apos;t fix the actual problem:


{{{
diff --git a/meta/classes/gsettings.bbclass b/meta/classes/gsettings.bbclass
index eae3dc7999..07d477c999 100644
--- a/meta/classes/gsettings.bbclass
+++ b/meta/classes/gsettings.bbclass
@@ -15,7 +15,10 @@ FILES_${PN} += &quot;${datadir}/glib-2.0/schemas&quot;
 PACKAGE_WRITE_DEPS += &quot;glib-2.0-native&quot;

 gsettings_postinstrm () {
-       glib-compile-schemas $D${datadir}/glib-2.0/schemas
+        if [ -e $D${datadir}/glib-2.0/schemas ]
+        then
+            glib-compile-schemas $D${datadir}/glib-2.0/schemas
+        fi
 }

 python populate_packages_append () {
}}}</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>82319</commentid>
    <comment_count>1</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2018-11-26 15:56:58 +0000</bug_when>
    <thetext>The correct fix is to remove the gsettings inherit from that recipe, because it doesn&apos;t install any schemas.

As that&apos;s a meta-gnome recipe, please submit a patch to the oe-devel list.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>82378</commentid>
    <comment_count>2</comment_count>
    <who name="Pablo Saavedra">psaavedra</who>
    <bug_when>2018-12-01 17:15:25 +0000</bug_when>
    <thetext>Let me detail a bit more the issue...

The problem is not only with the `onboard` package. I&apos;m working in a recipe for `ibus` [1]. This one builds and runs OK for `sumo` in a downstream project. What I want do now is to contribute this recipes in `meta-openembedded`. The problem that I have it is the same that I reported with the previous one, `onboard` (BTW, the only which is using dconf as dependency in all OE or Yocto recipes nowadays).

As I said, this problem doesn&apos;t happen in sumo but it is happeing in master. According with this, I&apos;ve noted that `dconf` was upgraded from  0.18 [2] to 0.28 [3] and the recipe changed a lot as well.


The error, as you say, points to no schemas found in the `schemas` dir. Yes that it true but not what I can see in the directory. This is why I&apos;m suspecting about dconf package:

{{{
$ ls /home/igalia/psaavedra/yocto/build/tmp/work/genericx86_64-poky-linux/core-image-sato/1.0-r0/rootfs/usr/share/glib-2.0/schemas/
gschemas.compiled                 org.gtk.Demo.gschema.xml        org.gtk.Settings.ColorChooser.gschema.xml  org.gtk.Settings.EmojiChooser.gschema.xml
org.freedesktop.ibus.gschema.xml  org.gtk.exampleapp.gschema.xml  org.gtk.Settings.Debug.gschema.xml         org.gtk.Settings.FileChooser.gschema.xml
}}}


{{{
cat /home/igalia/psaavedra/yocto/build/tmp/work/genericx86_64-poky-linux/core-image-sato/1.0-r0/temp/log.do_rootfs.80365
...
Installed: dconf-0.28.0-r0.core2_64
ufdio:       2 writes,    51152 total bytes in 0.000049 secs
ufdio:       2 writes,    55184 total bytes in 0.000045 secs
ufdio:       2 writes,    63376 total bytes in 0.000054 secs
ufdio:       3 writes,    84008 total bytes in 0.000064 secs
ufdio:       1 writes,       68 total bytes in 0.000009 secs
fdio:      69 reads,   255924 total bytes in 0.006610 secs
  Installing       : dconf-0.28.0-r0.core2_64                          395/1308
  Running scriptlet: dconf-0.28.0-r0.core2_64                          395/1308fdio:       2 writes,      174 total bytes in 0.000010 secs

D: ========== +++ dconf-0.28.0-r0 core2_64-linux 0x0
D: dconf-0.28.0-r0.core2_64: Header SHA256 digest: OK
D: dconf-0.28.0-r0.core2_64: Header SHA1 digest: OK
D:   install: dconf-0.28.0-r0.core2_64 has 15 files
D: ========== Directories not explicitly included in package:
D:          0 /
D: ==========
D: create     040755  1 (   0,   0)     0 /usr
D: create     040755  1 (   0,   0)     0 /usr/bin
D: create     100755  1 (   0,   0) 51152 /usr/bin/dconf;5c02ba5a
D: create     040755  1 (   0,   0)     0 /usr/lib
D: skip       040755  1 (   0,   0)     0 /usr/lib/gio
D: skip       040755  1 (   0,   0)     0 /usr/lib/gio/modules
D: create     100755  1 (   0,   0) 55184 /usr/lib/gio/modules/libdconfsettings.so;5c02ba5a
D: create     120777  1 (   0,   0)    17 /usr/lib/libdconf.so.1;5c02ba5a
D: create     100755  1 (   0,   0) 63376 /usr/lib/libdconf.so.1.0.0;5c02ba5a
D: create     040755  1 (   0,   0)     0 /usr/libexec
D: create     100755  1 (   0,   0) 84008 /usr/libexec/dconf-service;5c02ba5a
D: skip       040755  1 (   0,   0)     0 /usr/share
D: create     040755  1 (   0,   0)     0 /usr/share/dbus-1
D: create     040755  1 (   0,   0)     0 /usr/share/dbus-1/services
D: create     100644  1 (   0,   0)    68 /usr/share/dbus-1/services/ca.desrt.dconf.service;5c02ba5a
D: adding &quot;dconf&quot; to Name index.
D: adding 15 entries to Basenames index.
D: adding &quot;x11/gnome&quot; to Group index.
D: adding 48 entries to Requirename index.
D: adding 3 entries to Providename index.
D: adding 10 entries to Dirnames index.
D: adding 1 entries to Installtid index.
D: adding 1 entries to Sigmd5 index.
D: adding &quot;009f09e7d285a590dfac2aacd4a3ae8914a004df&quot; to Sha1header index.
D: %post(dconf-0.28.0-r0.core2_64): scriptlet start
D: %post(dconf-0.28.0-r0.core2_64): execv(/bin/sh) pid 89263
+ set -e
+ glib-compile-schemas /home/igalia/psaavedra/yocto/build/tmp/work/genericx86_64-poky-linux/core-image-sato/1.0-r0/rootfs/usr/share/glib-2.0/schemas
Error opening directory “/home/igalia/psaavedra/yocto/build/tmp/work/genericx86_64-poky-linux/core-image-sato/1.0-r0/rootfs/usr/share/glib-2.0/schemas”: No such file or directory
D: %post(dconf-0.28.0-r0.core2_64): waitpid(89263) rc 89263 status 100
warning: %post(dconf-0.28.0-r0.core2_64) scriptlet failed, exit status 1
}}}




[1] http://lists.openembedded.org/pipermail/openembedded-devel/2018-November/197599.html
[2] http://cgit.openembedded.org/meta-openembedded/tree/meta-gnome/recipes-gnome/dconf?h=sumo
[3] http://cgit.openembedded.org/meta-openembedded/tree/meta-gnome/recipes-gnome/dconf?h=thud</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>82379</commentid>
    <comment_count>3</comment_count>
    <who name="Pablo Saavedra">psaavedra</who>
    <bug_when>2018-12-01 18:08:41 +0000</bug_when>
    <thetext>Ouch, I must admit my error reading you response before. Yes, the error as you points it is in dconf and as I pointed as well is because changes in the recipe. 


Sorry for unnecessary noise in the resolution of the ticket and thanks for point me in the right path. I&apos;ll proceed as you suggested.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>82380</commentid>
    <comment_count>4</comment_count>
    <who name="Pablo Saavedra">psaavedra</who>
    <bug_when>2018-12-01 19:24:41 +0000</bug_when>
    <thetext>For the record: http://lists.openembedded.org/pipermail/openembedded-devel/2018-December/197706.html</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>