From d2f45dea4c4e3548c8938d69acb254c902bdd928 Mon Sep 17 00:00:00 2001 From: Thomas Devoogdt Date: Fri, 28 Apr 2023 09:59:20 +0200 Subject: [PATCH] package/libgtk3: fix update-icon-cache on empty directory If both, hicolor-icon-theme (selected by libgtk3-demo) and adwaita-icon-theme is not selected, then the /usr/share/icons folder is empty, causing find to fail. Signed-off-by: Thomas Devoogdt Tested-by: Adrian Perez de Castro Reviewed-by: Adrian Perez de Castro Signed-off-by: Yann E. MORIN --- package/libgtk3/libgtk3.mk | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/package/libgtk3/libgtk3.mk b/package/libgtk3/libgtk3.mk index d1840ef112..8291b8d356 100644 --- a/package/libgtk3/libgtk3.mk +++ b/package/libgtk3/libgtk3.mk @@ -146,8 +146,9 @@ endef # Create icon-theme.cache for each of the icon directories/themes # It's not strictly necessary but speeds up lookups define LIBGTK3_UPDATE_ICON_CACHE - find $(TARGET_DIR)/usr/share/icons -maxdepth 1 -mindepth 1 -type d \ - -exec $(HOST_DIR)/bin/gtk-update-icon-cache {} \; + [ ! -d $(TARGET_DIR)/usr/share/icons ] || \ + find $(TARGET_DIR)/usr/share/icons -maxdepth 1 -mindepth 1 -type d \ + -exec $(HOST_DIR)/bin/gtk-update-icon-cache {} \; endef LIBGTK3_TARGET_FINALIZE_HOOKS += LIBGTK3_UPDATE_ICON_CACHE