Bug 396619

Summary: All Exports fail - cannot find ioslave
Product: [Applications] digikam Reporter: Carlos Echenique <carlos>
Component: Bundle-AppImageAssignee: Digikam Developers <digikam-bugs-null>
Status: RESOLVED FIXED    
Severity: major CC: caulier.gilles, metzpinguin
Priority: NOR    
Version: 5.9.0   
Target Milestone: ---   
Platform: Appimage   
OS: Linux   
Latest Commit: Version Fixed In: 6.0.0
Sentry Crash Report:

Description Carlos Echenique 2018-07-18 05:33:39 UTC
The appimage cannot find the ioslave in order to export. This is running on Kubuntu 18.04. The 6.0.0 preview also exhibits this behavior.
Comment 1 Maik Qualmann 2018-07-18 05:57:37 UTC

*** This bug has been marked as a duplicate of bug 387201 ***
Comment 2 Maik Qualmann 2018-07-18 06:02:05 UTC
Please read this:

https://bugs.kde.org/show_bug.cgi?id=389785#c9

Maik
Comment 3 Carlos Echenique 2018-07-18 06:26:46 UTC
It's a little vague at the end there. Link kioslave to /usr/bin? Where do I put this kioslave link? Can you post the exact command that makes this work?
Comment 4 caulier.gilles 2018-07-18 07:13:12 UTC
Carlos,

Kioslave is voluntary disabled when KF5::KIO is compiled for AppImage bundle. I'm sure i write the script...

Why ? because KIOslave is a _big_ run time puzzle and a _big_ pain. including all KIO run time in the bundle will explose the file size. digiKam bundle must be the most optimum as possible. This is the goal.

So there is no current solution for the moment with the official bundle.

But for the future, we will use Qt5:QWebEngine to handle the web service login with all export tools. This is mostly done a a develop branch for next 6.0.0.

The branch must be finalized and the scripts to bundle digiKam adjusted. We working on. Be patient.

Gilles Caulier
Comment 5 caulier.gilles 2018-08-15 09:28:41 UTC
Git commit 2eb13d7ceab223675a86bbdac0a1065b206c2954 by Gilles Caulier.
Committed on 14/08/2018 at 21:48.
Pushed by cgilles into branch 'master'.

use system() call instead QProcess

M  +6    -13   project/bundles/3rdparty/ext_qt/qt-appimage-support.patch

https://commits.kde.org/digikam/2eb13d7ceab223675a86bbdac0a1065b206c2954

diff --git a/project/bundles/3rdparty/ext_qt/qt-appimage-support.patch b/project/bundles/3rdparty/ext_qt/qt-appimage-support.patch
index 781ed92ca8..dd6d99b250 100644
--- a/project/bundles/3rdparty/ext_qt/qt-appimage-support.patch
+++ b/project/bundles/3rdparty/ext_qt/qt-appimage-support.patch
@@ -2,7 +2,7 @@ diff --git a/qtbase/src/platformsupport/services/genericunix/qgenericunixservice
 index cdb5d33859..5a2bd5f724 100644
 --- a/qtbase/src/platformsupport/services/genericunix/qgenericunixservices.cpp
 +++ b/qtbase/src/platformsupport/services/genericunix/qgenericunixservices.cpp
-@@ -146,7 +146,30 @@ static inline bool launch(const QString &launcher, const QUrl &url)
+@@ -146,7 +146,23 @@ static inline bool launch(const QString &launcher, const QUrl &url)
  #if !QT_CONFIG(process)
      const bool ok = ::system(qPrintable(command + QLatin1String(" &")));
  #else
@@ -17,20 +17,13 @@ index cdb5d33859..5a2bd5f724 100644
 +    {
 +        qDebug() << "Adjusting environment variables for AppImage bundle";
 +
-+        env.insert(QLatin1String("LD_LIBRARY_PATH"),
-+                   env.value(QLatin1String("APPIMAGE_ORIGINAL_LD_LIBRARY_PATH")));
-+        env.insert(QLatin1String("QT_PLUGIN_PATH"),
-+                   env.value(QLatin1String("APPIMAGE_ORIGINAL_QT_PLUGIN_PATH")));
-+        env.insert(QLatin1String("XDG_DATA_DIRS"),
-+                   env.value(QLatin1String("APPIMAGE_ORIGINAL_XDG_DATA_DIRS")));
-+        env.insert(QLatin1String("PATH"),
-+                   env.value(QLatin1String("APPIMAGE_ORIGINAL_PATH")));
++        setenv("LD_LIBRARY_PATH", env.value(QLatin1String("APPIMAGE_ORIGINAL_LD_LIBRARY_PATH")).toLatin1().data(), 1);
++        setenv("QT_PLUGIN_PATH",  env.value(QLatin1String("APPIMAGE_ORIGINAL_QT_PLUGIN_PATH")).toLatin1().data(),  1);
++        setenv("XDG_DATA_DIRS",   env.value(QLatin1String("APPIMAGE_ORIGINAL_XDG_DATA_DIRS")).toLatin1().data(),   1);
++        setenv("PATH",            env.value(QLatin1String("APPIMAGE_ORIGINAL_PATH")).toLatin1().data(),            1);
 +    }
 +
-+    QProcess process;
-+    process.setProcessEnvironment(env);
-+    process.setProgram(command);
-+    const bool ok = process.startDetached();
++    const bool ok = ::system(qPrintable(command + QLatin1String(" &")));
  #endif
      if (!ok)
          qWarning("Launch failed (%s)", qPrintable(command));