Warning, /packaging/yocto-meta-kde/recipes-support/sddm/sddm/0001-Workaround-missing-sessions.patch is written in an unsupported language. File is not indexed.

0001 From cc0c929db02116516bb3475e5fd3ae7f43c88220 Mon Sep 17 00:00:00 2001
0002 From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@gmail.com>
0003 Date: Sun, 25 Nov 2018 00:29:17 +0100
0004 Subject: [PATCH] Workaround missing sessions
0005 MIME-Version: 1.0
0006 Content-Type: text/plain; charset=UTF-8
0007 Content-Transfer-Encoding: 8bit
0008 
0009 The current approach is wrong in many ways:
0010 
0011 * In case a session file does not set TryExec it is kept enabled accidentlty
0012 * Session files with TryExec without full path are ignored. Problem here: sddm
0013   tries to find executables based on PATH environment. Problem at least for my
0014   environment: There is no PATH variable set by systemd. So for session files
0015   without path: Do not perform further checks / just trust for now.
0016 
0017 Upstream-Sttaus: Pending
0018 
0019 Signed-off-by: Andreas Müller <schnitzeltony@gmail.com>
0020 
0021 ---
0022  src/greeter/SessionModel.cpp | 19 ++++---------------
0023  1 file changed, 4 insertions(+), 15 deletions(-)
0024 
0025 diff --git a/src/greeter/SessionModel.cpp b/src/greeter/SessionModel.cpp
0026 index 58d8764..c2b5884 100644
0027 --- a/src/greeter/SessionModel.cpp
0028 +++ b/src/greeter/SessionModel.cpp
0029 @@ -138,22 +138,11 @@ namespace SDDM {
0030          for (auto& session : qAsConst(sessions)) {
0031              Session *si = new Session(type, session);
0032              bool execAllowed = true;
0033 -            QFileInfo fi(si->tryExec());
0034 -            if (fi.isAbsolute()) {
0035 -                if (!fi.exists() || !fi.isExecutable())
0036 +            if(!si->tryExec().isEmpty()) {
0037 +                QFileInfo fi(si->tryExec());
0038 +                if (fi.isAbsolute()) {
0039 +                    if (!fi.exists() || !fi.isExecutable())
0040                      execAllowed = false;
0041 -            } else {
0042 -                execAllowed = false;
0043 -                QProcessEnvironment env = QProcessEnvironment::systemEnvironment();
0044 -                QString envPath = env.value(QStringLiteral("PATH"));
0045 -                const QStringList pathList = envPath.split(QLatin1Char(':'));
0046 -                for(const QString &path : pathList) {
0047 -                    QDir pathDir(path);
0048 -                    fi.setFile(pathDir, si->tryExec());
0049 -                    if (fi.exists() && fi.isExecutable()) {
0050 -                        execAllowed = true;
0051 -                        break;
0052 -                    }
0053                  }
0054              }
0055              // add to sessions list