[neon/snap-packaging/kf6-core/work.core24] /: Fix theme caches

Scarlett Moore null at kde.org
Tue Apr 29 11:21:29 BST 2025


Git commit 83c0fb66bdd090a5f27b085e3fe59277a64676f2 by Scarlett Moore.
Committed on 29/04/2025 at 10:20.
Pushed by scarlettmoore into branch 'work.core24'.

Fix theme caches

M  +22   -2    snapcraft.yaml

https://invent.kde.org/neon/snap-packaging/kf6-core/-/commit/83c0fb66bdd090a5f27b085e3fe59277a64676f2

diff --git a/snapcraft.yaml b/snapcraft.yaml
index fd5f09d..df92d86 100644
--- a/snapcraft.yaml
+++ b/snapcraft.yaml
@@ -277,12 +277,16 @@ parts:
     source: https://github.com/canonical/gpu-snap.git
     build-snaps:
       - gtk-common-themes
+      - gtk-theme-breeze
+      - icon-theme-breeze
     build-packages:
       - python3-pip
       - zip
       - python3-apt
     stage-packages:
       - libgdk-pixbuf-2.0-0
+    stage:
+      - -usr/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR/libxml2.so.2.9.14
     build-environment: *buildenvironment
     override-prime: |
       craftctl default
@@ -296,13 +300,29 @@ parts:
           $CRAFT_STAGE/usr/bin/gtk-update-icon-cache --force "$dir"
         fi
       done
-
+      cd /snap/gtk-theme-breeze/current
+      find . -type f,l ! -name index.theme -exec rm -f $CRAFT_PRIME/usr/{} \;
+      cd $CRAFT_PRIME
+      for dir in usr/share/icons/*; do
+        if [ -f "$dir/index.theme" ]; then
+          $CRAFT_STAGE/usr/bin/gtk-update-icon-cache --force "$dir"
+        fi
+      done
+      cd /snap/icon-theme-breeze/current
+      find . -type f,l ! -name index.theme -exec rm -f $CRAFT_PRIME/usr/{} \;
+      cd $CRAFT_PRIME
+      for dir in usr/share/icons/*; do
+        if [ -f "$dir/index.theme" ]; then
+          $CRAFT_STAGE/usr/bin/gtk-update-icon-cache --force "$dir"
+        fi
+      done
+      $CRAFT_STAGE/usr/bin/kbuildsycoca6 --noincremental
       rm -rf usr/share/doc
       rm -rf usr/share/man
 
       find . -type d -empty -delete
 
-       ${CRAFT_PART_SRC}/bin/gpu-2404-cleanup mesa-2404
+      ${CRAFT_PART_SRC}/bin/gpu-2404-cleanup mesa-2404
 
   alsa-pulseaudio:
     plugin: dump


More information about the Neon-commits mailing list