Bug 428681

Summary: Searching in Installed packages doesn't work at all
Product: [Applications] Discover Reporter: Piotr Mierzwinski <piotr.mierzwinski>
Component: discoverAssignee: Dan Leinir Turthra Jensen <leinir>
Status: RESOLVED FIXED    
Severity: normal CC: aleixpol, bugseforuns, cassim2972, kde, nate
Priority: VHI Keywords: regression
Version: 5.20.2   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed In: 5.21

Description Piotr Mierzwinski 2020-11-04 11:32:22 UTC
SUMMARY
I tried to find installed package calling kvantum. Discover returned me only useless, not related packages.
In my system (Arch) this package calling kvantum-qt5, but also putting such name returns nothing interested. I know that packages is installed, because pamac returns me correct information.

The same I also tested in "KDE Neon" (with recent updates, so today, 12:15. Here I found Plasma 5.20.80 and KF-5.76.0). Here package calls qt5-style-kvantum. Package manager Synaptic returned me correct information, whilst Discover returned useless, not usable information about some packages.

After that I tried to find another applications/packages what I have installed, and again without success. I tried with: gdb, kdevelop, konsole, discover, kwrite, kate. Every time, whatever I put here then after pressing Enter I can see the same list of packages.

STEPS TO REPRODUCE
1. Run Discover and select "Installed"
2. Put any name of installed application/package. I tested with kvantum, gdb, kdevelop, konsole, discover, kwrite, kate
3. Check result in view "Installed"

OBSERVED RESULT
Found nothing, or actually is shown some list of packages not related with search template.

EXPECTED RESULT
All packages matching to search template like showed in other package managers (pamac, octopi, Synaptic).

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: YES
(available in About System)
KDE Plasma Version: 5.20.2
KDE Frameworks Version: 5.75.0
Qt Version: 5.15.1

ADDITIONAL INFORMATION
Comment 1 Nate Graham 2020-11-04 18:21:17 UTC
Discover isn't a package manager. It's used for installing and managing apps and user-facing resources, not packages.

That said, the installed page being broken is definitely a bug. I can reproduce. This used to work but it looks like it must have broken recently.
Comment 2 cassim2972 2020-12-05 14:39:00 UTC
i am receiving aborted due to failure error when i try to update all applications or remove single application in discover.
Comment 3 David Edmundson 2021-01-09 19:09:46 UTC
PackageKitBackend::search doesn't check filter.search if filter.state == installed.
Comment 4 Bug Janitor Service 2021-01-28 18:49:24 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/discover/-/merge_requests/64
Comment 5 Aleix Pol 2021-01-28 19:59:17 UTC
Git commit c1224ba80c434d4dc6e582f146be728c47125370 by Aleix Pol.
Committed on 28/01/2021 at 18:47.
Pushed by ngraham into branch 'master'.

pk: Fix installed filtering

We were giving all of them and the proxy isn't smart enough to do the
filtering.

M  +7    -4    libdiscover/backends/PackageKitBackend/PackageKitBackend.cpp

https://invent.kde.org/plasma/discover/commit/c1224ba80c434d4dc6e582f146be728c47125370
Comment 6 Nate Graham 2021-01-28 19:59:44 UTC
Git commit ad57ecf1c0d3d0994b9b7ec0e89b09bff1fa94c4 by Nate Graham, on behalf of Aleix Pol.
Committed on 28/01/2021 at 19:59.
Pushed by ngraham into branch 'Plasma/5.21'.

pk: Fix installed filtering

We were giving all of them and the proxy isn't smart enough to do the
filtering.


(cherry picked from commit c1224ba80c434d4dc6e582f146be728c47125370)

M  +7    -4    libdiscover/backends/PackageKitBackend/PackageKitBackend.cpp

https://invent.kde.org/plasma/discover/commit/ad57ecf1c0d3d0994b9b7ec0e89b09bff1fa94c4