Bug 472925

Summary: Can't download any Plasma styles (or Global Themes that include them) from store.kde.org using GHNS dialog
Product: [Frameworks and Libraries] frameworks-knewstuff Reporter: Nate Graham <nate>
Component: generalAssignee: Alexander Lohnau <alexander.lohnau>
Status: RESOLVED FIXED    
Severity: major CC: ahmedmoselhi55, alexander.lohnau, bugseforuns, kde, kdelibs-bugs, nicolas.fella, notmart, zubkovbackend
Priority: NOR Keywords: qt6
Version: unspecified   
Target Milestone: ---   
Platform: Neon   
OS: Linux   
See Also: https://bugs.kde.org/show_bug.cgi?id=474498
https://bugs.kde.org/show_bug.cgi?id=476930
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Nate Graham 2023-08-02 15:10:01 UTC
STEPS TO REPRODUCE
1. run `kcm_desktoptheme` or `systemsettings kcm_lookandfeel`
2. Click on "Get new [thing]"
3. Try to install anything


OBSERVED RESULT
kf.newstuff.core: Install: "ROUNDED DARK" from "/tmp/NaGfeK-com.github.varlesh.rounded-dark.tar.gz"
kf.package: Couldn't open metadata file "/tmp/NaGfeK-com.github.varlesh.rounded-dark.tar.gz" "/tmp/systemsettings-rBRSOs/com.github.varlesh.rounded-dark/"


EXPECTED RESULT
It downloads and installs


ADDITIONAL INFORMATION
Only seems to affect Global themes. Using the GHNS dialog to download color schemes and cursor themes works.
Comment 1 Nate Graham 2023-08-02 20:37:54 UTC
Can't install locally either; the KCM says, "Theme installation failed." which unfortunately is not very descriptive. But maybe the root cause is the same.
Comment 2 Stepan Zubkov 2023-08-11 19:11:11 UTC
Same thing on KDE Neon Unstable. I cannot install theme from locally or from kde store
Comment 3 Nicolas Fella 2023-09-11 19:43:13 UTC
The cause seems to be that most/all global themes use destop file metadata instead of JSON metadata
Comment 4 David Redondo 2023-09-13 06:45:24 UTC
I know that Marco added some compatibility so Plasma Themes with metadata.desktop still work. But I guess then installing will fail...
Comment 5 Nate Graham 2023-09-13 17:16:00 UTC
Ok, so then I guess we need to make sure they can be downloaded using GHNS so that the compatibility work that was added in Plasma will let them be installed.
Comment 6 ahmedmoselhi55 2023-11-18 17:41:56 UTC
same issue still happening to me on latest dev build
Comment 7 Bug Janitor Service 2023-12-01 15:10:26 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/3638
Comment 8 Bug Janitor Service 2023-12-18 13:36:04 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/libplasma/-/merge_requests/1018
Comment 9 Alexander Lohnau 2023-12-19 12:23:51 UTC
https://invent.kde.org/frameworks/kpackage/-/merge_requests/91 Adds the ability for KPackage to install packages without metadata files. Also, it allows package structures to define compatibility code.
Comment 10 Alexander Lohnau 2023-12-19 16:18:31 UTC
Git commit 114d6fd1ec65145efe74779a4f70e031e1108d36 by Alexander Lohnau.
Committed on 19/12/2023 at 13:24.
Pushed by alex into branch 'master'.

Don't require metadata.json for installing package

M  +0    -1    src/kpackage/packagejob.h
M  +1    -11   src/kpackage/private/packagejobthread.cpp

https://invent.kde.org/frameworks/kpackage/-/commit/114d6fd1ec65145efe74779a4f70e031e1108d36
Comment 11 Alexander Lohnau 2023-12-19 16:18:32 UTC
Git commit a51505385047b201a011b9b70e595348c0e92e01 by Alexander Lohnau.
Committed on 19/12/2023 at 17:10.
Pushed by alex into branch 'master'.

PackageJobThread: Read metadata from KPackage rather than metadata.json file

We need to load the metadata from the package later on anyway. This
ensures that the plugin ID the API consumer might utilize is also the
value we append to the path. Meaning the assumption that
<packageroot>/<pluginId> points to the dir on disk is still true.

M  +7    -15   src/kpackage/private/packagejobthread.cpp

https://invent.kde.org/frameworks/kpackage/-/commit/a51505385047b201a011b9b70e595348c0e92e01