Bug 415583

Summary: Global Themes with SDDM Themes fail to install if SDDM is not installed
Product: [Applications] systemsettings Reporter: The Feren OS Dev <ferenosdev>
Component: kcm_lookandfeelAssignee: Alexander Lohnau <alexander.lohnau>
Status: RESOLVED FIXED    
Severity: normal CC: alexander.lohnau, doncbugs, drace.davidson, grulich.r, leinir, nate
Priority: NOR    
Version: 5.17.4   
Target Milestone: ---   
Platform: Neon   
OS: Linux   
Latest Commit: Version Fixed In: Frameworks 5.99
Sentry Crash Report:

Description The Feren OS Dev 2019-12-26 15:07:10 UTC
SUMMARY
Global Themes that have an SDDM theme as part of their pack do not get installed to ~/.local/share/plasma/look-and-feel if SDDM is not installed and /usr/share/SDDM therefore does not exist.

STEPS TO REPRODUCE
1. Remove SDDM and any SDDM Themes left over
2. Go into Global Theme -> Get New Global Themes...
3. Install a Global Theme that should pull in an SDDM Theme such as Layan or Sweet

OBSERVED RESULT
The Global Theme isn't installed to its proper place at all and therefore doesn't appear in Global Theme despite being "Installed"

EXPECTED RESULT
The Global Theme will be installed to the correct location minus the SDDM theme it provides users with and will be in Global Theme

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: Feren OS (KDE neon 5.17.4)
(available in About System)
KDE Plasma Version: 5.17.4
KDE Frameworks Version: 5.64.0
Qt Version: 5.13.2

ADDITIONAL INFORMATION
Comment 1 The Feren OS Dev 2020-06-10 01:46:41 UTC
Reproduced on Frameworks 5.70.0 on KDE neon 5.19.0

With the introduction of the error messages upon failure, this message is provided in the case of the McMojave Global Theme:
An error occurred during the installation process:
The installation failed with code 4 while attempting to run the command:
kpackagetool5 -t Plasma/LookAndFeel -i /tmp/02-com.github.vinceliuice.McMojave-light.tar.xz

The returned output was:
Error: Installation of /tmp/02-com.github.vinceliuice.McMojave-light.tar.xz failed: Could not install dependency: 'kns://sddmtheme.knsrc/api.kde-look.org/1312086'
Comment 2 The Feren OS Dev 2020-06-10 01:50:28 UTC
As for running the command normally:
$~: kpackagetool5 -t Plasma/LookAndFeel -i /tmp/02-com.github.vinceliuice.McMojave-light.tar.xz
already installed.
already installed.
already installed.
already installed.
already installed.
couldn't find knsrc file for "sddmtheme.knsrc"
Error: Installation of /tmp/02-com.github.vinceliuice.McMojave-light.tar.xz failed: Could not install dependency: 'kns://sddmtheme.knsrc/api.kde-look.org/1312086'
Comment 3 Andrew 2020-07-23 19:29:38 UTC
Also having this issue
Comment 4 Bug Janitor Service 2022-09-13 17:31:21 UTC
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/kpackage/-/merge_requests/53
Comment 5 Alexander Lohnau 2022-09-14 10:06:30 UTC
Git commit c3e8c13e6c625fcf765f64a868f0c4d8b4544e4a by Alexander Lohnau.
Committed on 14/09/2022 at 10:06.
Pushed by alex into branch 'master'.

Ignore sddmtheme dependencies if we do not have the knsrc file installed

Otherwise, global themes that have this dependency can not be installed where the SDDM-KCM is not installed.

M  +6    -0    src/kpackage/private/packagejobthread.cpp

https://invent.kde.org/frameworks/kpackage/commit/c3e8c13e6c625fcf765f64a868f0c4d8b4544e4a