Review Request 116927: Fix kdeinit module lookup

Alex Merry alex.merry at kde.org
Thu Mar 20 18:30:57 UTC 2014


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/116927/
-----------------------------------------------------------

(Updated March 20, 2014, 6:30 p.m.)


Review request for KDE Frameworks and David Faure.


Repository: kinit


Description
-------

Fix kdeinit module lookup

KLibrary's lookup magic is not so magic these days - is just uses
QCoreApplication::libraryPaths, which is not what we want.  Instead, we
let dlopen() do the searching for us, plus hack in a check in the
library installation directory for kinit (since dlopen() called from Qt
does not respect kdeinit5's RUNPATH).

This should cover most common cases (module installed to standard
location, module installed to same location as the kinit framework,
mdoule in LD_LIBRARY_PATH), and if it still fails we just fall back to
the normal executable.

Rename kinit_library_path() to generate_socket_name()

This reflects what the function actually does.  Also got rid of the
(mostly) ifdef'd-out code that gave the function its original name.

Add comment about fragility of lookup based on installation vars


Diffs
-----

  src/kdeinit/CMakeLists.txt c4e3c49ea28d4e96be9ee1fa02f801052945d01e 
  src/kdeinit/kinit.cpp 82d570c4453cf083e525125edd448b97d8d11bd3 

Diff: https://git.reviewboard.kde.org/r/116927/diff/


Testing
-------

Built and installed.  Ran kdeinit5, which reported that it was launching "libkdeinit5_klauncher", rather than "/home/kf5-devel/kf5/bin/klauncher" as it did previously.  klauncher process then has "[kdeinit]" in its process title in `ps xu`.


Thanks,

Alex Merry

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20140320/45dd54ae/attachment-0001.html>


More information about the Kde-frameworks-devel mailing list