From e2165e26db21e8d6c3bedbea8a9e07cc0d7421b1 Mon Sep 17 00:00:00 2001 From: Zoltan Boszormenyi Date: Wed, 6 Dec 2023 10:19:22 +0100 Subject: [PATCH] update_gtk_icon_cache: Fix for GTK4-only builds MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Try to execute both gtk-update-icon-cache and gtk4-update-icon-cache after checking whether the commands are available. This attempts to match what gtk-icon-cache.bbclass is doing. This fixes running update_gtk_icon_cache during do_rootfs for an image that contains only GTK4 related packages. (From OE-Core rev: 1e01ef59a5864f1261e9c0ca76fcccee2eb7e7f3) Signed-off-by: Zoltán Böszörményi Signed-off-by: Alexandre Belloni Signed-off-by: Richard Purdie --- scripts/postinst-intercepts/update_gtk_icon_cache | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/scripts/postinst-intercepts/update_gtk_icon_cache b/scripts/postinst-intercepts/update_gtk_icon_cache index 99367a2855..a92bd840c6 100644 --- a/scripts/postinst-intercepts/update_gtk_icon_cache +++ b/scripts/postinst-intercepts/update_gtk_icon_cache @@ -11,7 +11,11 @@ $STAGING_DIR_NATIVE/${libdir_native}/gdk-pixbuf-2.0/gdk-pixbuf-query-loaders --u for icondir in $D/usr/share/icons/*/ ; do if [ -d $icondir ] ; then - gtk-update-icon-cache -fqt $icondir + for gtkuic_cmd in gtk-update-icon-cache gtk4-update-icon-cache ; do + if [ -n "$(which $gtkuic_cmd)" ]; then + $gtkuic_cmd -fqt $icondir + fi + done fi done