actually look for mysql binaries in PATH
ClosedPublic

Authored by sitter on Jan 22 2019, 2:13 PM.

Details

Summary

the new helper findExectuable first tries to find the executables in the
default location. which is all the sane distro/system paths and will 99%
yield a result.
should it come back negative we'll fall back to the hardcoded list of
paths as previously used.

this fixes binary lookup when the entire dir tree is located *not* under /
(as with snap and I think also appimage)

Diff Detail

Repository
R165 Akonadi
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
sitter created this revision.Jan 22 2019, 2:13 PM
Restricted Application added a project: KDE PIM. · View Herald TranscriptJan 22 2019, 2:13 PM
Restricted Application added a subscriber: kde-pim. · View Herald Transcript
sitter requested review of this revision.Jan 22 2019, 2:13 PM

On NixOS, all executables are under /nix/store/$HASH-$NAME/bin. These get linked into the PATH. Seeing that Akonadi was not respecting PATH previously I wonder how it could work there.
So I checked https://github.com/NixOS/nixpkgs/blob/master/pkgs/applications/kde/akonadi/akonadi-paths.patch

There the paths are hardcoded. I think after this lands the NixOS patch can be simplified, although the hard-coding gives a faster startup.

Patch looks elegant to me.

dvratil accepted this revision.Jan 23 2019, 9:38 AM

Thanks for the fix, Harald. Merge this into Applications/18.12 branch please.

This revision is now accepted and ready to land.Jan 23 2019, 9:38 AM
This revision was automatically updated to reflect the committed changes.