libsForQt515.solid: patch binary search paths

This adds "/run/wrappers/bin" to a hardcoded list of search paths.
This is neccessary to mount filesystems configured in /etc/fstab in
dolphin (for example network shares that are not always mounted).

Fixes #188098.
This commit is contained in:
apfelkuchen06 2022-11-21 17:26:07 +01:00
parent 883e1d43b5
commit 9a8481780b
3 changed files with 19 additions and 1 deletions

View file

@ -128,7 +128,7 @@ let
oxygen-icons5 = callPackage ./oxygen-icons5.nix {};
prison = callPackage ./prison.nix {};
qqc2-desktop-style = callPackage ./qqc2-desktop-style.nix {};
solid = callPackage ./solid.nix {};
solid = callPackage ./solid {};
sonnet = callPackage ./sonnet.nix {};
syntax-highlighting = callPackage ./syntax-highlighting.nix {};
threadweaver = callPackage ./threadweaver.nix {};

View file

@ -6,6 +6,7 @@
mkDerivation {
pname = "solid";
patches = [ ./fix-search-path.patch ];
nativeBuildInputs = [ bison extra-cmake-modules flex media-player-info ];
buildInputs = [ qtdeclarative qttools ];
propagatedBuildInputs = [ qtbase ];

View file

@ -0,0 +1,17 @@
diff --git a/src/solid/devices/backends/fstab/fstabhandling.cpp b/src/solid/devices/backends/fstab/fstabhandling.cpp
index ac2a628..7ee46cc 100644
--- a/src/solid/devices/backends/fstab/fstabhandling.cpp
+++ b/src/solid/devices/backends/fstab/fstabhandling.cpp
@@ -275,7 +275,11 @@ bool Solid::Backends::Fstab::FstabHandling::callSystemCommand(const QString &com
const QObject *receiver,
std::function<void(QProcess *)> callback)
{
- static const QStringList searchPaths{QStringLiteral("/sbin"), QStringLiteral("/bin"), QStringLiteral("/usr/sbin"), QStringLiteral("/usr/bin")};
+ static const QStringList searchPaths{QStringLiteral("/run/wrappers/bin"),
+ QStringLiteral("/sbin"),
+ QStringLiteral("/bin"),
+ QStringLiteral("/usr/sbin"),
+ QStringLiteral("/usr/bin")};
static const QString joinedPaths = searchPaths.join(QLatin1Char(':'));
const QString exec = QStandardPaths::findExecutable(commandName, searchPaths);
if (exec.isEmpty()) {