poky/scripts/postinst-intercepts/update_gtk_icon_cache
Zoltan Boszormenyi e2165e26db update_gtk_icon_cache: Fix for GTK4-only builds
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 <zboszor@gmail.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-12-08 16:58:34 +00:00

513 B

#!/bin/sh

SPDX-License-Identifier: MIT

Post-install intercept for gtk-icon-cache.bbclass

set -e

Update native pixbuf loaders

$STAGING_DIR_NATIVE/${libdir_native}/gdk-pixbuf-2.0/gdk-pixbuf-query-loaders --update-cache

for icondir in $D/usr/share/icons/*/ ; do if [ -d $icondir ] ; then 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