Bug 417510 - Update of icons set doesn't work
Summary: Update of icons set doesn't work
Status: RESOLVED FIXED
Alias: None
Product: frameworks-knewstuff
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: 5.71.0
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: Dan Leinir Turthra Jensen
URL:
Keywords:
: 423656 (view as bug list)
Depends on:
Blocks:
 
Reported: 2020-02-12 19:11 UTC by Piotr Mierzwinski
Modified: 2020-09-15 16:52 UTC (History)
7 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.75


Attachments
knewstuff - icons (233.40 KB, image/png)
2020-02-12 19:11 UTC, Piotr Mierzwinski
Details
systemsettings output (789.73 KB, text/x-log)
2020-04-20 18:58 UTC, Piotr Mierzwinski
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Piotr Mierzwinski 2020-02-12 19:11:48 UTC
Created attachment 125911 [details]
knewstuff - icons

SUMMARY
I updated KFrameworks (to 5.67) couple days ago, and Plasma (to 5.18) today. I restarted my PC. After logged in I opened System Settings -> Icons and wanted to update my icons. I got new view (by default 4 big subviews of icons set). 
I selected "Installed Only" and clicked in button "Update" for first icons set (Papirus). After that happened nothing. No any progress, no any change on picture and button "Update" still present. I tried to do it the same with different icons set what finished with the same result. Seems it has been broken, because in previous version I was able to update icons set.

BTW. In second view of icon sets (missing tooltip so it's hard to call it) button related with update looks like narrow vertical line and we can only guess that is "Update".

Please notice that
In all views button "Update" does nothing.
In all views icon sets (filtered with "Installed Only") are duplicated.


STEPS TO REPRODUCE
1. Having installed couple not updated icon sets, open System Settings -> Icons
2. Click "Get New Icons"
3. On bottom select "Installed Only"
4. Should be visible icons set to be updated
5. Click button "Update" on any of them

OBSERVED RESULT
- Nothing happens. Icon set is not updated.
- Icons set are duplicated (in "Installed Only").

EXPECTED RESULT
- Clicked icons set should be updated and button not be shown again.
- Icons set should be not duplicated (in "Installed Only").

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: YES
(available in About System)
KDE Plasma Version: 5.18
KDE Frameworks Version: 5.67
Qt Version: 5.14.1

ADDITIONAL INFORMATION
Comment 1 Dan Leinir Turthra Jensen 2020-02-27 09:58:24 UTC
i've submitted a patch to hopefully attempt to alleviate this issue. It turns out that it is less than straightforward and the way the old widget did the job was just not suitable in the general case (and especially for unattended update situations, such as it would want to be in e.g. Discover)... https://phabricator.kde.org/D27544
Comment 2 Nate Graham 2020-02-27 15:47:08 UTC
Thanks!
Comment 3 Dan Leinir Turthra Jensen 2020-03-19 10:34:29 UTC
Git commit f1dcbddf12ea44a13963ce800223a2e683b2617d by Dan Leinir Turthra Jensen.
Committed on 19/03/2020 at 10:34.
Pushed by leinir into branch 'master'.

Fix update scenarios with no explicit downloadlink selected

Summary:
The old downloadwidget's update system would explicitly require a user
to pick which download item to use for updating if there was more than
one available. This work is an attempt at implementing this at the
engine level, while also allowing for there to be no requirement to
make an active choice, unless there is no way to deduce which of
the various potential download items is the one we are trying to
update.

The current heuristics are:
- If there is one downloaditem, that's what we're updating
- If there are more, first try and see if one has the precise url
  as the previously installed payload
- If that fails, check for filename matches (without the rest of
  the url)
- Only if that fails, present the user with a choice

Add an explicit update function in the QtQuick items model

Fix erroneous uses of installItem, and use updateItem for updates
in the QtQuick components

Reviewers: #knewstuff, #frameworks, #plasma, ngraham, apol, #discover_software_store, ahiemstra

Reviewed By: ngraham, ahiemstra

Subscribers: ahiemstra, alexde, kde-frameworks-devel

Tags: #frameworks

Differential Revision: https://phabricator.kde.org/D27544

M  +5    -0    CMakeLists.txt
M  +83   -1    src/core/engine.cpp
M  +2    -2    src/qtquick/qml/EntryDetails.qml
M  +2    -2    src/qtquick/qml/NewStuffItem.qml
M  +2    -2    src/qtquick/qml/private/entrygriddelegates/BigPreviewDelegate.qml
M  +2    -2    src/qtquick/qml/private/entrygriddelegates/ThumbDelegate.qml
M  +2    -2    src/qtquick/qml/private/entrygriddelegates/TileDelegate.qml
M  +5    -0    src/qtquick/quickitemsmodel.cpp
M  +23   -0    src/qtquick/quickitemsmodel.h

https://commits.kde.org/knewstuff/f1dcbddf12ea44a13963ce800223a2e683b2617d
Comment 4 Piotr Mierzwinski 2020-04-20 18:57:24 UTC
I'm sorry but fix seems doesn't work for me.

This time after I click 'Update' button I get animation and label "Updating..." below. The view of icon set I want to update is grey. I waited several minutes and nothing happened. Content of directory with this set is not changed at all. Icon set is placed at: ~/.local/share/icons. On disct here there is enough free space, and in / is also enough free space.
I tried to update "McMojave-circle".
I closed this window and opened again, but still can see the same: 'Updating'. Only closing systemsettings5 application stops it.
I attach log what produced application on stdout.

Please notice I tried also to update any "Plasma Style" with the same result.

Operating System: Antergos Linux 
KDE Plasma Version: 5.18.4
KDE Frameworks Version: 5.69.0
Qt Version: 5.14.2
Kernel Version: 5.6.4-arch1-1
OS Type: 64-bit
Processors: 8 × Intel® Core™ i7-6700 CPU @ 3.40GHz
Memory: 15,5 GiB of RAM
Comment 5 Piotr Mierzwinski 2020-04-20 18:58:04 UTC
Created attachment 127722 [details]
systemsettings output
Comment 6 Piotr Mierzwinski 2020-04-20 19:56:12 UTC
OK. I tried couple times and finally noticed barely visible error message. 
It appeared on bottom of window on line of combo boxes as tool tip. I didn't notice it before because background of tool tip was transparent. I have transparent Plasma Style, so it's correct. Only I wonder why this error was reported in totally different way than in other KDE/Plasma applications, where usually appears (on top or on bottom of window) as red bar with error message which is pretty visible.
Anyway I got saying nothing (for me) error like:
"Unknown Open Collaboration Service API/error (0)."

I tried to update also in KaOS (up-to-dated). And got the same message.
Comment 7 Patrick Silva 2020-04-20 20:00:18 UTC
(In reply to Piotr Mierzwinski from comment #6)
> Anyway I got saying nothing (for me) error like:
> "Unknown Open Collaboration Service API/error (0)."

Already reported as bug 419959
Comment 8 Nate Graham 2020-04-21 02:33:33 UTC
Let's keep this closed and tack the new failure at Bug 419959.

:(
Comment 9 Patrick Silva 2020-06-16 12:25:24 UTC
This problem persists.
On my system I can't update icon theme, color scheme and global theme.
The GHNS windows apparently install the updates without any error but the same updates are available when the GHNS windows are reopened.

Operating System: Arch Linux 
KDE Plasma Version: 5.19.0
KDE Frameworks Version: 5.71.0
Qt Version: 5.15.0
Comment 10 Patrick Silva 2020-06-29 16:33:07 UTC
*** Bug 423656 has been marked as a duplicate of this bug. ***
Comment 11 Martin 2020-06-29 17:16:17 UTC
Thanks for pointing to this bug. Besides icon theme, color scheme and global theme, none of the widgets update. It's impossible to find duplicates (for anyone new like me) if this bug isn't renamed to more adequately describe the issue at hand. I'd recommend to keep my previous title or add it to this one.
Comment 12 Piotr Mierzwinski 2020-06-29 20:31:36 UTC
I noticed that in case of "Global Themes" for option "Installed only" is showing nothing. The same in option "Updateable only". I have in local directory ("~/.local/share/plasma/look-and-feel") couple themes. No one is achievable in both mentioned option. Among others I have such: "Moddzik". In option "Show 
Everything" I found it, but I cannot uninstall it. I have only option "Install". 

Second thing is "Plasma Style". Here happens the same. I have a lot installed styles locally ("~/.local/share/plasma/desktoptheme") and using option "Installed only" I can see empty view. I suppose option "Updateable only" doesn't work, as well. I'm going to check every one to find is any of them has update or not.

Seems this still doesn't work correctly.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: YES
(available in About System)
KDE Plasma Version: 5.19.2
KDE Frameworks Version: 5.71
Qt Version: 5.15.0
Comment 13 Martin 2020-06-30 10:38:53 UTC
Did you try updating any widgets?
Comment 14 Piotr Mierzwinski 2020-06-30 11:08:13 UTC
(In reply to Martin from comment #13)
> Did you try updating any widgets?

I think I updated Colors in the past (after fix) and passed well.
Today I updated one set of Cursors and passed well.
BTW.
Option "Updateable" is a bit not clear.
Firstly I thought here I found all widgets/packages to update, but I was wrong. Today I discovered that after update one package (here one set of Cursors) this one appears in "Updateable". 
Please notice that potentially all widges/packages are able to be updated.
I don't know what I should expect to find in this option.

Issue I described that "Get New..." is not able to recognize that something is already installed also I found in another category. I mean in "Colors". Here took "first better", so "LuckyEyes" from installed already. Opened "Get New Color...", found it with button "Install". Why? This is already installed. This is not part of "Global Theme".

cd ~/.local/share/color-schemes
$ ls -l |grep Lucky
-rw-r--r-- 1 piotra piotra 2213 15.08.2017 17:22 LuckyEyes.colors
$ grep Name LuckyEyes.colors 
Name=LuckyEyes

The same in Plasma Style. I took for checking: "Nilium" (not part of "Global Theme"), which I have installed. I found it with selected option "Show Everything" (the same like for Colors) and also here found button "Install", whereas I expected "Uninstall" and "Use". And of course it wasn't present in "Installed only", because I have it empty.

If you need I can provide more details.
Comment 15 Martin 2020-06-30 13:19:11 UTC
Yeah, the entire widget update process has serious usability issues. Currently the process looks like this: 
1. Right click on panel and click "Add Widgets"
2. Click on "Get new widgets..."
3. Download New Plasma widgets
4. Click on "Installed"
5. You will realize that "Search" is inactive, that is, broken. 
6. You click on "Most downloads"
7. Search for the widget you want to update. 
8. You will realize that you cannot find all widgets in this way. 
9. You are only able to find widgets which are listed under "Most downloads"
10. Click on "Install"
11. You will realize that the "Install" button may occasionally change to "Installing", sometimes it simply remains at "Install" despite you having clicked it. 
12. You wait forever, nothing happens. 
13. You restart your laptop.
14. You check on a widget to see if it has updated and realize that it failed to update. 
15. You start process 1) to 12) again. By the time you reach 13) you think that either you switch to GNOME or you help the Plasma guys out with establishing guidelines on what usability is. Without any proper KDE Human Interface Guidelines, any attempt at improving usability is but a futile attempt. Let's just fix the update process for now but for anyone who reads this, we need a Plasma revolution for this to work properly. 


Why would  There is simply no easy way to update and never has been. I only raised the issue as updating any widget is broken now. Not sure when this regression was introduced but it must have been before 5.18.5.
Comment 16 Martin 2020-06-30 13:25:08 UTC
To add to my previous comment: I actually wonder to what extent it makes sense to fix this. The best way may be to write this from scratch and provide a way to update widgets that actually makes sense. My suggestion here would be: Right-click on a widget in the widget overview on the left side, click update. Done!
Comment 17 Piotr Mierzwinski 2020-06-30 16:14:21 UTC
(In reply to Martin from comment #15)
> Yeah, the entire widget update process has serious usability issues.
> Currently the process looks like this: 
> 1. Right click on panel and click "Add Widgets"
> 2. Click on "Get new widgets..."
> 3. Download New Plasma widgets
> 4. Click on "Installed"
> 5. You will realize that "Search" is inactive, that is, broken. 
> 6. You click on "Most downloads"
> 7. Search for the widget you want to update. 
> 8. You will realize that you cannot find all widgets in this way. 
> 9. You are only able to find widgets which are listed under "Most downloads"
> 10. Click on "Install"
> 11. You will realize that the "Install" button may occasionally change to
> "Installing", sometimes it simply remains at "Install" despite you having
> clicked it. 
> 12. You wait forever, nothing happens. 
> 13. You restart your laptop.
> 14. You check on a widget to see if it has updated and realize that it
> failed to update. 
> 15. You start process 1) to 12) again. By the time you reach 13) you think
> that either you switch to GNOME or you help the Plasma guys out with
> establishing guidelines on what usability is. Without any proper KDE Human
> Interface Guidelines, any attempt at improving usability is but a futile
> attempt. Let's just fix the update process for now but for anyone who reads
> this, we need a Plasma revolution for this to work properly. 
> 
> 
> Why would  There is simply no easy way to update and never has been. I only
> raised the issue as updating any widget is broken now. Not sure when this
> regression was introduced but it must have been before 5.18.5.

As far as I remember new version "Get New..." doesn't work correctly from very first its release. 
Please consider that in KDE/Plasma was correctly working widget (including update). Maybe this widget was not so pretty and not so usable and so human readable, but has one big advantage - was working! Only this previous version wasn't based on QtQuick framework.
If you want to know how looked previous version then open "System Settings -> Application Style -> Windows Decorations -> Gen New Window...."

I think you don't need to switch to GNOME just because this issue.
There is some ugly work around for update not working well. I mean manually update. For example you remove some addon for example icons set, try to find it in "Get New ..."  and just install what you found. Of course better is not remove only just rename some package (in file system).
Comment 19 Alexander Lohnau 2020-09-07 19:07:09 UTC
>Why would  There is simply no easy way to update and never has been. I only raised the issue as updating any widget is broken now.
The widgets are now updatable, that has been tracked in BUG 424429

@Patrick Silva All the bugs you linked are resolved. So hopefully we can resolve this one too :-)
Comment 20 Alexander Lohnau 2020-09-07 19:22:44 UTC
I can reproduce this. From the logs it seems like the entry got downloaded. This will need some more debugging (have not that time right now to do this, sorry).
Comment 21 Alexander Lohnau 2020-09-15 15:56:23 UTC
See https://invent.kde.org/frameworks/knewstuff/-/merge_requests/54 for the fix.

It seems that the most icons were affected by this bug, because the authors don't provider version numbers and the modification date does not get persisted as it should.
Comment 22 Alexander Lohnau 2020-09-15 16:52:48 UTC
Git commit 28f254aa6bdf5336f9b4a280f33577d5397fdcf8 by Alexander Lohnau.
Committed on 15/09/2020 at 16:52.
Pushed by alex into branch 'master'.

Fix updating of entry if version number is empty

The status was set to installed and then the values were not updated.
FIXED-IN: 5.75

M  +5    -9    src/core/installation.cpp

https://invent.kde.org/frameworks/knewstuff/commit/28f254aa6bdf5336f9b4a280f33577d5397fdcf8