Bug 388313 - Categories from Flatpak not de-duplicated
Summary: Categories from Flatpak not de-duplicated
Status: VERIFIED FIXED
Alias: None
Product: Discover
Classification: Applications
Component: Flatpak Backend (show other bugs)
Version: 5.11.4
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Aleix Pol
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-12-29 00:21 UTC by Nate Graham
Modified: 2018-01-09 01:44 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Categories duplicated after adding Flatpak backend and Flathub source (422.25 KB, image/png)
2017-12-29 00:21 UTC, Nate Graham
Details
Still happening in git master (395.63 KB, image/png)
2018-01-08 22:04 UTC, Nate Graham
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Nate Graham 2017-12-29 00:21:29 UTC
Created attachment 109569 [details]
Categories duplicated after adding Flatpak backend and Flathub source

[Discover from git master] 

After building the Flatpak backend and adding the Flathub source, Discover shows duplicate categories. It seems that the Flatpak categories are not de-duplicated with PackageKit catagories that have the same name. The duplicate categories all show the same actual source content. If I remove the Flatpak backend, the problem disappears.

This seems to have regressed in git master, since in Discover 5.11.4, categories with the same name are never duplicated.
Comment 1 Aleix Pol 2017-12-29 14:12:53 UTC
Works here.
Can you run it from the console and check there's no weird warnings?
Comment 2 Nate Graham 2017-12-29 17:28:12 UTC
Here's the console output:

$ plasma-discover 
invalid kns backend! "/etc/xdg/ksysguard.knsrc" because: "Config group not found! Check your KNS3 installation."
invalid kns backend! "/etc/xdg/servicemenu.knsrc" because: "Config group not found! Check your KNS3 installation."
Discarding invalid backend "ksysguard.knsrc"
Discarding invalid backend "servicemenu.knsrc"
setting currentApplicationBackend PackageKitBackend(0x1c66120)
Failed to refresh appstream metadata for  flathub :  GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.Flatpak.SystemHelper was not provided by any .service files

Maybe that's a clue?
Comment 3 Aleix Pol 2018-01-08 22:00:34 UTC
This should be fixed as of db212c8e (master).
Comment 4 Nate Graham 2018-01-08 22:04:26 UTC
Created attachment 109746 [details]
Still happening in git master

I'm afraid not. I just built Discover from git master and it's still happening for a few categories (Accessories, Accessibility, Games, Graphics). See attached screenshot.
Comment 5 Aleix Pol 2018-01-09 00:04:28 UTC
Git commit 2359fe4adb7063b0bed610ad8b085f0a4616a2fc by Aleix Pol.
Committed on 08/01/2018 at 23:59.
Pushed by apol into branch 'master'.

Make sure we don't treat a non-sorted vector as sorted

M  +23   -0    libdiscover/Category/Category.cpp
M  +2    -1    libdiscover/Category/Category.h
M  +1    -0    libdiscover/Category/CategoryModel.cpp

https://commits.kde.org/discover/2359fe4adb7063b0bed610ad8b085f0a4616a2fc
Comment 6 Nate Graham 2018-01-09 01:44:30 UTC
Verified, all better now! Thanks!