diff mbox series

[meta-gnome] tracker: dont inherit gsettings

Message ID 20231209170903.672584-1-f_l_k@t-online.de
State Accepted
Headers show
Series [meta-gnome] tracker: dont inherit gsettings | expand

Commit Message

Markus Volk Dec. 9, 2023, 5:09 p.m. UTC
this fixes an issue I encountered on raspberrypi4-64 at do_rootfs:
ERROR: hyprland-image-1.0-r0 do_rootfs: Postinstall scriptlets of ['tracker'] 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/flk/poky/build-raspi/tmp/work/raspberrypi4_64-poky-linux/hyprland-image/1.0/temp/log.do_rootfs.
ERROR: Logfile of failure stored in: /home/flk/poky/build-raspi/tmp/work/raspberrypi4_64-poky-linux/hyprland-image/1.0/temp/log.do_rootfs.629667
ERROR: Task (/home/flk/poky/meta-hyprland-image/recipes-core/images/hyprland-image.bb:do_rootfs) failed with exit code '1'

Signed-off-by: Markus Volk <f_l_k@t-online.de>
---
 meta-gnome/recipes-gnome/tracker/tracker_3.6.0.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Ross Burton Dec. 11, 2023, 10:20 a.m. UTC | #1
On 9 Dec 2023, at 17:09, Markus Volk via lists.openembedded.org <f_l_k=t-online.de@lists.openembedded.org> wrote:
> 
> this fixes an issue I encountered on raspberrypi4-64 at do_rootfs:
> ERROR: hyprland-image-1.0-r0 do_rootfs: Postinstall scriptlets of ['tracker'] 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.

Did you confirm that tracker doesn’t install gsettings schemas?  This smells like a workaround that has collateral damage.

Ross
Markus Volk Dec. 11, 2023, 11:20 a.m. UTC | #2
On Mon, Dec 11 2023 at 10:20:29 AM +00:00:00, Ross Burton 
<Ross.Burton@arm.com> wrote:
> Did you confirm that tracker doesn’t install gsettings schemas?  
> This smells like a workaround that has collateral damage.
> 
> Ross

had a look at gsettings.bbclass and it wants to run

gsettings_postinstrm () {
	glib-compile-schemas $D${datadir}/glib-2.0/schemas
}

${D}${datadir}/glib-2.0 is not installed by tracker

I guess thats the reason for exit 1
Ross Burton Dec. 11, 2023, 11:21 a.m. UTC | #3
On 11 Dec 2023, at 11:20, f_l_k@t-online.de wrote:
> 
> On Mon, Dec 11 2023 at 10:20:29 AM +00:00:00, Ross Burton <Ross.Burton@arm.com> wrote:
>> Did you confirm that tracker doesn´t install gsettings schemas? This smells like a workaround that has collateral damage. Ross
> 
> 
> had a look at gsettings.bbclass and it wants to run 
> 
> gsettings_postinstrm () {
> glib-compile-schemas $D${datadir}/glib-2.0/schemas
> }
> 
> 
> ${D}${datadir}/glib-2.0 is not installed by tracker
> 
> 
> I guess thats the reason for exit 1

So the class is redundant, yes.  Can you also add a check to the gsettings.bbclass so its harmless instead of crashing?

Ross
Markus Volk Dec. 11, 2023, 11:37 a.m. UTC | #4
On Mon, Dec 11 2023 at 11:21:48 AM +00:00:00, Ross Burton 
<Ross.Burton@arm.com> wrote:
> So the class is redundant, yes.  Can you also add a check to the 
> gsettings.bbclass so its harmless instead of crashing?

something like this?
gsettings_postinstrm () {
	[ -d $D${datadir}/glib-2.0/schemas ] && glib-compile-schemas 
$D${datadir}/glib-2.0/schemas
}

glib-compile-schemas hasn't an option to not fail if the directory was 
not found

But maybe crashing isn't that bad. Helps to keep the recipes more clean 
I think?
Ross Burton Dec. 11, 2023, 11:41 a.m. UTC | #5
On 11 Dec 2023, at 11:37, f_l_k@t-online.de wrote:
> 
> On Mon, Dec 11 2023 at 11:21:48 AM +00:00:00, Ross Burton <Ross.Burton@arm.com> wrote:
>> So the class is redundant, yes. Can you also add a check to the gsettings.bbclass so its harmless instead of crashing?
> 
> 
> something like this?
> gsettings_postinstrm () {
> [ -d $D${datadir}/glib-2.0/schemas ] && glib-compile-schemas $D${datadir}/glib-2.0/schemas
> }
> 
> glib-compile-schemas hasn't an option to not fail if the directory was not found
> 
> But maybe crashing isn't that bad. Helps to keep the recipes more clean I think?

Crashing is bad: failing with an error message is better.  And recipes may have an option for gsettings (unlikely, I admit, but possible) and then they’ll need to mess about with conditional inherits.

Ross
Markus Volk Dec. 11, 2023, 12:41 p.m. UTC | #6
What really puzzles me is the fact, that I didn't have the issue for my 
intel build and even with adding back inherit gsettings to the tracker 
recipe I'm unable to reproduce the issue for raspberrypi now.

Whatever, tracker doesn't install glib schemas so the commit should be 
correct in any case

On Mon, Dec 11 2023 at 11:41:50 AM +00:00:00, Ross Burton 
<Ross.Burton@arm.com> wrote:
> On 11 Dec 2023, at 11:37, f_l_k@t-online.de 
> <mailto:f_l_k@t-online.de> wrote:
>> 
>>  On Mon, Dec 11 2023 at 11:21:48 AM +00:00:00, Ross Burton 
>> <Ross.Burton@arm.com <mailto:Ross.Burton@arm.com>> wrote:
>>>  So the class is redundant, yes. Can you also add a check to the 
>>> gsettings.bbclass so its harmless instead of crashing?
>> 
>> 
>>  something like this?
>>  gsettings_postinstrm () {
>>  [ -d $D${datadir}/glib-2.0/schemas ] && glib-compile-schemas 
>> $D${datadir}/glib-2.0/schemas
>>  }
>> 
>>  glib-compile-schemas hasn't an option to not fail if the directory 
>> was not found
>> 
>>  But maybe crashing isn't that bad. Helps to keep the recipes more 
>> clean I think?
> 
> Crashing is bad: failing with an error message is better.  And 
> recipes may have an option for gsettings (unlikely, I admit, but 
> possible) and then they’ll need to mess about with conditional 
> inherits.
> 
> Ross
>
Khem Raj Dec. 13, 2023, 7:07 a.m. UTC | #7
On Sat, 09 Dec 2023 18:09:03 +0100, Markus Volk wrote:
> this fixes an issue I encountered on raspberrypi4-64 at do_rootfs:
> ERROR: hyprland-image-1.0-r0 do_rootfs: Postinstall scriptlets of ['tracker'] 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/flk/poky/build-raspi/tmp/work/raspberrypi4_64-poky-linux/hyprland-image/1.0/temp/log.do_rootfs.
> ERROR: Logfile of failure stored in: /home/flk/poky/build-raspi/tmp/work/raspberrypi4_64-poky-linux/hyprland-image/1.0/temp/log.do_rootfs.629667
> ERROR: Task (/home/flk/poky/meta-hyprland-image/recipes-core/images/hyprland-image.bb:do_rootfs) failed with exit code '1'
> 
> [...]

Applied, thanks!

[1/1] tracker: dont inherit gsettings
      commit: 602306d4bdfdd0d636103c6037b8627be385ba54

Best regards,
diff mbox series

Patch

diff --git a/meta-gnome/recipes-gnome/tracker/tracker_3.6.0.bb b/meta-gnome/recipes-gnome/tracker/tracker_3.6.0.bb
index c5b5c4eab..603efbb32 100644
--- a/meta-gnome/recipes-gnome/tracker/tracker_3.6.0.bb
+++ b/meta-gnome/recipes-gnome/tracker/tracker_3.6.0.bb
@@ -19,7 +19,7 @@  DEPENDS = " \
 "
 
 
-inherit gettext gnomebase gsettings gobject-introspection vala gtk-doc  bash-completion python3native
+inherit gettext gnomebase gobject-introspection vala gtk-doc bash-completion python3native
 
 SRC_URI += "file://0001-fix-reproducibility.patch"
 SRC_URI[archive.sha256sum] = "52592cfe19baffd16dbe47475be7da750dbd0b6333fd7acb60faa9da5bc40df2"