Skip to content

Commit 3fc9abd

Browse files
authored
fix(kde-neon-6): don't modify LD_LIBRARY_PATH (#6016)
1 parent 3ac8506 commit 3fc9abd

File tree

4 files changed

+15
-50
lines changed

4 files changed

+15
-50
lines changed

extensions/desktop/common/desktop-exports

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -453,7 +453,7 @@ fi
453453

454454
# GTK theme and behavior modifier
455455
# Those can impact the theme engine used by Qt as well
456-
gtk_configs=(gtk-3.0/settings.ini gtk-3.0/bookmarks gtk-2.0/gtkfilechooser.ini)
456+
gtk_configs=(gtk-4.0/settings.ini gtk-4.0/gtk.css gtk-4.0/bookmarks gtk-4.0/colors.css gtk-3.0/settings.ini gtk-3.0/gtk.css gtk-3.0/bookmarks gtk-3.0/colors.css gtk-2.0/gtkfilechooser.ini)
457457
for f in "${gtk_configs[@]}"; do
458458
dest="$XDG_CONFIG_HOME/$f"
459459
if [ ! -L "$dest" ]; then

extensions/desktop/kde-neon-6/launcher-specific

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ append_dir LD_LIBRARY_PATH "$SNAP_DESKTOP_RUNTIME/usr/lib/$ARCH/blas"
1515
# lapack
1616
append_dir LD_LIBRARY_PATH "$SNAP_DESKTOP_RUNTIME/usr/lib/$ARCH/lapack"
1717

18+
# lxqt-support
19+
append_dir LD_LIBRARY_PATH "$SNAP/lxqt-support/usr/lib/$ARCH"
20+
1821
# KConfig uses QStandardPaths:GenericConfigLocation to get the config dir paths
1922
# and checks for the kdeglobals file there for theming. The kdeglobals file is
2023
# stored in $SNAP_REAL_HOME/.config folder.
@@ -26,6 +29,7 @@ append_dir QT_PLUGIN_PATH "$SNAP/usr/lib/$ARCH/qt6/plugins"
2629
append_dir QT_PLUGIN_PATH "$SNAP/usr/lib/$ARCH"
2730
append_dir QT_PLUGIN_PATH "$SNAP_DESKTOP_RUNTIME/usr/lib/$ARCH/qt6/plugins"
2831
append_dir QT_PLUGIN_PATH "$SNAP_DESKTOP_RUNTIME/usr/lib/$ARCH/"
32+
append_dir QT_PLUGIN_PATH "$SNAP/lxqt-support/usr/lib/$ARCH/qt6/plugins"
2933
# And QML2_IMPORT_PATH (Qt Modules).
3034
append_dir QML2_IMPORT_PATH "$SNAP/usr/lib/$ARCH/qt6/qml"
3135
append_dir QML2_IMPORT_PATH "$SNAP/lib/$ARCH"

snapcraft/extensions/kde_neon_6.py

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -228,23 +228,15 @@ def get_root_snippet(self) -> dict[str, Any]:
228228
lxqt_support_snap: {
229229
"content": lxqt_support_snap,
230230
"interface": "content",
231-
"target": f"$SNAP/{lxqt_support_snap}",
232231
"default-provider": lxqt_support_snap,
232+
"target": "$SNAP/lxqt-support",
233233
},
234234
**gpu_plugs,
235235
},
236236
"environment": {
237237
"SNAP_DESKTOP_RUNTIME": "$SNAP/kf6",
238238
"GTK_USE_PORTAL": "1",
239239
"PLATFORM_PLUG": platform_kf6_snap,
240-
"LD_LIBRARY_PATH": (
241-
f"$SNAP/{lxqt_support_snap}/usr/lib/"
242-
"${CRAFT_ARCH_TRIPLET_BUILD_FOR}:${LD_LIBRARY_PATH}"
243-
),
244-
"QT_PLUGIN_PATH": (
245-
f"$SNAP/{lxqt_support_snap}/usr/lib/"
246-
"${CRAFT_ARCH_TRIPLET_BUILD_FOR}/qt6/plugins:${QT_PLUGIN_PATH}"
247-
),
248240
},
249241
"hooks": {
250242
"configure": {
@@ -255,11 +247,8 @@ def get_root_snippet(self) -> dict[str, Any]:
255247
"layout": {
256248
"/usr/share/X11": {"symlink": "$SNAP/kf6/usr/share/X11"},
257249
"/usr/share/qt6": {"symlink": "$SNAP/kf6/usr/share/qt6"},
258-
"/usr/share/color-schemes": {
259-
"symlink": f"$SNAP/{lxqt_support_snap}/usr/share/color-schemes"
260-
},
261250
"/usr/share/Kvantum": {
262-
"symlink": f"$SNAP/{lxqt_support_snap}/usr/share/Kvantum"
251+
"symlink": "$SNAP/lxqt-support/usr/share/Kvantum"
263252
},
264253
**gpu_layouts,
265254
},

tests/unit/extensions/test_kde_neon_6.py

Lines changed: 8 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -177,8 +177,6 @@ def test_get_root_snippet(kde_neon_6_extension):
177177
"SNAP_DESKTOP_RUNTIME": "$SNAP/kf6",
178178
"GTK_USE_PORTAL": "1",
179179
"PLATFORM_PLUG": "kf6-core22",
180-
"LD_LIBRARY_PATH": "$SNAP/lxqt-support-core22/usr/lib/${CRAFT_ARCH_TRIPLET_BUILD_FOR}:${LD_LIBRARY_PATH}",
181-
"QT_PLUGIN_PATH": "$SNAP/lxqt-support-core22/usr/lib/${CRAFT_ARCH_TRIPLET_BUILD_FOR}/qt6/plugins:${QT_PLUGIN_PATH}",
182180
},
183181
"hooks": {
184182
"configure": {
@@ -190,12 +188,7 @@ def test_get_root_snippet(kde_neon_6_extension):
190188
"/usr/share/X11": {"symlink": "$SNAP/kf6/usr/share/X11"},
191189
"/usr/share/qt6": {"symlink": "$SNAP/kf6/usr/share/qt6"},
192190
"/usr/share/libdrm": {"bind": "$SNAP/kf6-core22/usr/share/libdrm"},
193-
"/usr/share/Kvantum": {
194-
"symlink": "$SNAP/lxqt-support-core22/usr/share/Kvantum"
195-
},
196-
"/usr/share/color-schemes": {
197-
"symlink": "$SNAP/lxqt-support-core22/usr/share/color-schemes"
198-
},
191+
"/usr/share/Kvantum": {"symlink": "$SNAP/lxqt-support/usr/share/Kvantum"},
199192
},
200193
"plugs": {
201194
"desktop": {"mount-host-font-cache": False},
@@ -229,7 +222,7 @@ def test_get_root_snippet(kde_neon_6_extension):
229222
"content": "lxqt-support-core22",
230223
"interface": "content",
231224
"default-provider": "lxqt-support-core22",
232-
"target": "$SNAP/lxqt-support-core22",
225+
"target": "$SNAP/lxqt-support",
233226
},
234227
},
235228
}
@@ -243,8 +236,6 @@ def test_get_root_snippet_core24(kde_neon_6_extension_core24):
243236
"SNAP_DESKTOP_RUNTIME": "$SNAP/kf6",
244237
"GTK_USE_PORTAL": "1",
245238
"PLATFORM_PLUG": "kf6-core24",
246-
"LD_LIBRARY_PATH": "$SNAP/lxqt-support-core24/usr/lib/${CRAFT_ARCH_TRIPLET_BUILD_FOR}:${LD_LIBRARY_PATH}",
247-
"QT_PLUGIN_PATH": "$SNAP/lxqt-support-core24/usr/lib/${CRAFT_ARCH_TRIPLET_BUILD_FOR}/qt6/plugins:${QT_PLUGIN_PATH}",
248239
},
249240
"hooks": {
250241
"configure": {
@@ -257,12 +248,7 @@ def test_get_root_snippet_core24(kde_neon_6_extension_core24):
257248
"/usr/share/qt6": {"symlink": "$SNAP/kf6/usr/share/qt6"},
258249
"/usr/share/libdrm": {"bind": "$SNAP/gpu-2404/libdrm"},
259250
"/usr/share/drirc.d": {"symlink": "$SNAP/gpu-2404/drirc.d"},
260-
"/usr/share/Kvantum": {
261-
"symlink": "$SNAP/lxqt-support-core24/usr/share/Kvantum"
262-
},
263-
"/usr/share/color-schemes": {
264-
"symlink": "$SNAP/lxqt-support-core24/usr/share/color-schemes"
265-
},
251+
"/usr/share/Kvantum": {"symlink": "$SNAP/lxqt-support/usr/share/Kvantum"},
266252
},
267253
"plugs": {
268254
"desktop": {"mount-host-font-cache": False},
@@ -301,7 +287,7 @@ def test_get_root_snippet_core24(kde_neon_6_extension_core24):
301287
"content": "lxqt-support-core24",
302288
"interface": "content",
303289
"default-provider": "lxqt-support-core24",
304-
"target": "$SNAP/lxqt-support-core24",
290+
"target": "$SNAP/lxqt-support",
305291
},
306292
},
307293
}
@@ -342,8 +328,6 @@ def test_get_root_snippet_with_external_sdk(kde_neon_6_extension_with_build_snap
342328
"SNAP_DESKTOP_RUNTIME": "$SNAP/kf6",
343329
"GTK_USE_PORTAL": "1",
344330
"PLATFORM_PLUG": "kf6-core22",
345-
"LD_LIBRARY_PATH": "$SNAP/lxqt-support-core22/usr/lib/${CRAFT_ARCH_TRIPLET_BUILD_FOR}:${LD_LIBRARY_PATH}",
346-
"QT_PLUGIN_PATH": "$SNAP/lxqt-support-core22/usr/lib/${CRAFT_ARCH_TRIPLET_BUILD_FOR}/qt6/plugins:${QT_PLUGIN_PATH}",
347331
},
348332
"hooks": {
349333
"configure": {
@@ -355,12 +339,7 @@ def test_get_root_snippet_with_external_sdk(kde_neon_6_extension_with_build_snap
355339
"/usr/share/X11": {"symlink": "$SNAP/kf6/usr/share/X11"},
356340
"/usr/share/qt6": {"symlink": "$SNAP/kf6/usr/share/qt6"},
357341
"/usr/share/libdrm": {"bind": "$SNAP/kf6-core22/usr/share/libdrm"},
358-
"/usr/share/Kvantum": {
359-
"symlink": "$SNAP/lxqt-support-core22/usr/share/Kvantum"
360-
},
361-
"/usr/share/color-schemes": {
362-
"symlink": "$SNAP/lxqt-support-core22/usr/share/color-schemes"
363-
},
342+
"/usr/share/Kvantum": {"symlink": "$SNAP/lxqt-support/usr/share/Kvantum"},
364343
},
365344
"plugs": {
366345
"desktop": {"mount-host-font-cache": False},
@@ -394,7 +373,7 @@ def test_get_root_snippet_with_external_sdk(kde_neon_6_extension_with_build_snap
394373
"content": "lxqt-support-core22",
395374
"interface": "content",
396375
"default-provider": "lxqt-support-core22",
397-
"target": "$SNAP/lxqt-support-core22",
376+
"target": "$SNAP/lxqt-support",
398377
},
399378
},
400379
}
@@ -410,8 +389,6 @@ def test_get_root_snippet_with_external_sdk_core24(
410389
"SNAP_DESKTOP_RUNTIME": "$SNAP/kf6",
411390
"GTK_USE_PORTAL": "1",
412391
"PLATFORM_PLUG": "kf6-core24",
413-
"LD_LIBRARY_PATH": "$SNAP/lxqt-support-core24/usr/lib/${CRAFT_ARCH_TRIPLET_BUILD_FOR}:${LD_LIBRARY_PATH}",
414-
"QT_PLUGIN_PATH": "$SNAP/lxqt-support-core24/usr/lib/${CRAFT_ARCH_TRIPLET_BUILD_FOR}/qt6/plugins:${QT_PLUGIN_PATH}",
415392
},
416393
"hooks": {
417394
"configure": {
@@ -424,12 +401,7 @@ def test_get_root_snippet_with_external_sdk_core24(
424401
"/usr/share/qt6": {"symlink": "$SNAP/kf6/usr/share/qt6"},
425402
"/usr/share/libdrm": {"bind": "$SNAP/gpu-2404/libdrm"},
426403
"/usr/share/drirc.d": {"symlink": "$SNAP/gpu-2404/drirc.d"},
427-
"/usr/share/Kvantum": {
428-
"symlink": "$SNAP/lxqt-support-core24/usr/share/Kvantum"
429-
},
430-
"/usr/share/color-schemes": {
431-
"symlink": "$SNAP/lxqt-support-core24/usr/share/color-schemes"
432-
},
404+
"/usr/share/Kvantum": {"symlink": "$SNAP/lxqt-support/usr/share/Kvantum"},
433405
},
434406
"plugs": {
435407
"desktop": {"mount-host-font-cache": False},
@@ -468,7 +440,7 @@ def test_get_root_snippet_with_external_sdk_core24(
468440
"content": "lxqt-support-core24",
469441
"interface": "content",
470442
"default-provider": "lxqt-support-core24",
471-
"target": "$SNAP/lxqt-support-core24",
443+
"target": "$SNAP/lxqt-support",
472444
},
473445
},
474446
}

0 commit comments

Comments
 (0)