Skip to contentSkip to conversation

gnome-tweaks: remove .pyc files with buildpaths embedded

PATCH New Ross Burton 1 participant 2 messages Nov 12, 2025

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 gnome-tweaks: remove .pyc files with buildpaths embedded

The python "optimised" .pyc files contain buildpaths. Delete those and leave the "unoptimised" .pyc files. The difference is very minor, mainly that optimised bytecode doesn't contain any assert statements.

---
 meta-gnome/recipes-gnome/gnome-tweaks/gnome-tweaks_40.0.bb | 6 ++++++
 1 file changed, 6 insertions(+)
meta-gnome/recipes-gnome/gnome-tweaks/gnome-tweaks_40.0.bb +6 -0
index a8d6a2ad69..498d392e89 100644
@@ -25,6 +25,12 @@ SRC_URI += " \
 
 EXTRA_OEMESON = "-Dpython_site_dir=${PYTHON_SITEPACKAGES_DIR}"
 
+# The optimised .pyc files contain buildpaths, delete them and leave the
+# normal ones to be packaged.
+do_install:append() {
+    find ${D}${PYTHON_SITEPACKAGES_DIR} -name *.opt*.pyc -delete
+}
+
 FILES:${PN} += " \
     ${datadir}/metainfo \
     ${PYTHON_SITEPACKAGES_DIR} \
Signature · 1 line
2.43.0
#1 lore raw

PATCH 2/2 gnome-flashback: fix build with new ibus

Backport a patch to fix the build:

libinput-sources/gf-candidate-popup.c:124:11: error:
too many arguments to function 'ibus_attribute_get_type'; expected 0, have 1

---
 .../gnome-flashback/files/ibus.patch          | 27 +++++++++++++++++++
 .../gnome-flashback/gnome-flashback_3.46.0.bb |  2 ++
 2 files changed, 29 insertions(+)
 create mode 100644 meta-gnome/recipes-gnome/gnome-flashback/files/ibus.patch
meta-gnome/recipes-gnome/gnome-flashback/files/ibus.patch new file +27 -0
new file mode 100644
index 0000000000..cd7f052ea5
@@ -0,0 +1,27 @@
+From 1bb758374500e247ffab150205d05b72bf21b561 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Alberts=20Muktup=C4=81vels?= <[email protected]>
+Date: Thu, 23 Jan 2025 14:22:33 +0200
+Subject: [PATCH] input-sources: use correct function to get attribute type
+
+Upstream-Status: Backport
+Signed-off-by: Ross Burton <[email protected]>
+---
+ gnome-flashback/libinput-sources/gf-candidate-popup.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/gnome-flashback/libinput-sources/gf-candidate-popup.c b/gnome-flashback/libinput-sources/gf-candidate-popup.c
+index a8bf5825..2c31e71a 100644
+--- a/gnome-flashback/libinput-sources/gf-candidate-popup.c
++++ b/gnome-flashback/libinput-sources/gf-candidate-popup.c
+@@ -121,7 +121,7 @@ update_preedit_text_cb (IBusPanelService *service,
+       guint start;
+       guint end;
+ 
+-      if (ibus_attribute_get_type (attribute) != IBUS_ATTR_TYPE_BACKGROUND)
++      if (ibus_attribute_get_attr_type (attribute) != IBUS_ATTR_TYPE_BACKGROUND)
+         continue;
+ 
+       start = ibus_attribute_get_start_index (attribute);
+-- 
+GitLab
+
meta-gnome/recipes-gnome/gnome-flashback/gnome-flashback_3.46.0.bb +2 -0
index cf1122714f..f297394d00 100644
@@ -19,6 +19,8 @@ DEPENDS += " \
     gnome-panel \
 "
 
+SRC_URI += "file://ibus.patch"
+
 SRC_URI[archive.sha256sum] = "7a8d5c03310e4dfadd18a65e00a37741032afeea5418dd6804a975c4b0980045"
 
 do_install:append() {
Signature · 1 line
2.43.0