Bug 13040

Summary: Error in dconf postinstall script
Product: [Build System, Metadata & Runtime] OE-Core Reporter: Pablo Saavedra <psaavedra>
Component: coreAssignee: Ross Burton <ross.burton>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: Undecided CC: meta.mr.watcher, meta.watcher
Version: 2.6   
Target Milestone: ---   
Hardware: All   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: No (bug/feature does not impact docs)

Description Pablo Saavedra 2018-11-26 15:48:54 UTC
{{{
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 = " \
    onboard \
"
}}}



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

Build Configuration:
BB_VERSION           = "1.40.0"
BUILD_SYS            = "x86_64-linux"
NATIVELSBSTRING      = "universal"
TARGET_SYS           = "x86_64-poky-linux"
MACHINE              = "genericx86-64"
DISTRO               = "poky"
DISTRO_VERSION       = "2.6+snapshot-20181126"
TUNE_FEATURES        = "m64 core2"
TARGET_FPU           = ""
meta
meta-poky
meta-yocto-bsp       = "master:3786729785f4d5a762d4f8883c7fe8d020e17bf0"
meta-oe
meta-python
meta-networking
...
ERROR: core-image-sato-1.0-r0 do_rootfs: Postinstall scriptlets of ['dconf'] 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 'exit 1' 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 '1'
NOTE: Tasks Summary: Attempted 6461 tasks of which 6440 didn't need to be rerun and 1 failed.
}}}



I was able to skip this error with this patch but I afraid this doesn'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} += "${datadir}/glib-2.0/schemas"
 PACKAGE_WRITE_DEPS += "glib-2.0-native"

 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 () {
}}}
Comment 1 Ross Burton 2018-11-26 15:56:58 UTC
The correct fix is to remove the gsettings inherit from that recipe, because it doesn't install any schemas.

As that's a meta-gnome recipe, please submit a patch to the oe-devel list.
Comment 2 Pablo Saavedra 2018-12-01 17:15:25 UTC
Let me detail a bit more the issue...

The problem is not only with the `onboard` package. I'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't happen in sumo but it is happeing in master. According with this, I'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'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 "dconf" to Name index.
D: adding 15 entries to Basenames index.
D: adding "x11/gnome" 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 "009f09e7d285a590dfac2aacd4a3ae8914a004df" 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
Comment 3 Pablo Saavedra 2018-12-01 18:08:41 UTC
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'll proceed as you suggested.