Bug 392429 - Missing apps in search results
Summary: Missing apps in search results
Status: RESOLVED UPSTREAM
Alias: None
Product: Discover
Classification: Applications
Component: PackageKit (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Aleix Pol
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-03-27 21:09 UTC by Vlad Zahorodnii
Modified: 2018-04-07 00:11 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Vlad Zahorodnii 2018-03-27 21:09:45 UTC
My setup:
* Distro: Arch Linux
* Plasma version: 5.12.3
* PackageKit backend: alpm

# Test case 1

Steps:
* install google-chrome and google-chrome-beta package from AUR
* open Discover
* type "google-chrome" in the search box

Expected:
Google Chrome and Google Chrome Beta are listed among search results

Actual:
Only Google Chrome is listend.

pkcon output:
```
$ pkcon search google-chrome
Searching by details          [=========================]         
Finished                      [=========================]         
Installed       google-chrome-65.0.3325.181-1.x86_64 (installed)                The popular and trusted web browser by Google (Stable Channel)
Installed       google-chrome-beta-66.0.3359.45-1.x86_64 (installed)            The popular and trusted web browser by Google (Beta Channel)
```


# Test case 2

Steps to reproduce:
* install google-chrome and google-chrome-beta package from AUR
* open Discover
* open "Applications" tab or whatever it is
* type "google-chrome" in the search box

Expected:
Google Chrome and Google Chrome Beta are listed among search results

Actual:
Discover haven't found both "Google Chrome" and "Google Chrome Beta". It outputs "Sorry, nothing found..."
Comment 1 Aleix Pol 2018-04-05 10:55:52 UTC
AUR isn't part of your distribution and as such isn't included in appstream metadata. This is not something we can support from Discover.
Comment 2 Antonio Rojas 2018-04-05 11:06:09 UTC
@Aleix I think they mean packages that are actually installed on the system (regardless of where they come from). In that case Discover shows them if you search for the exact package name, but not if you search for a substring (which 'pkcon search' does).
Comment 3 Vlad Zahorodnii 2018-04-05 14:29:10 UTC
(In reply to Antonio Rojas from comment #2)
> @Aleix I think they mean packages that are actually installed on the system
> (regardless of where they come from). In that case Discover shows them if
> you search for the exact package name, but not if you search for a substring
> (which 'pkcon search' does).

You're totally correct! But that's only the test case #1. ;-)

(In reply to Aleix Pol from comment #1)
> AUR isn't part of your distribution and as such isn't included in appstream
> metadata. This is not something we can support from Discover.

If some of AUR packages were installed earlier, these packages should be listed
among search results so they can be removed with GUI.

The test case #2 applies not only to AUR packages. For example, I use the following
repos:

[zzag]
[vscode]
[fonts]
[core]
[extra]
[community]

the vscode repo contains 2 packages: code(Visual Studio Code) and code-insiders(Visual
Studio Code Insiders), see https://imgur.com/a/Thq4h

If I search "code-insiders" right on the "main page", Visual Studio Code Insiders package is found, e.g.
https://imgur.com/a/gsfex

If I search "code-insiders" in Applications tab/page, nothing is found, e.g.
https://imgur.com/a/E1NIi

pkcon finds everything I expected.

IIRC Discover has the same behaviour in Ubuntu. http://www.ocsmag.com/2017/03/29/discover-discover/,
start reading from "Distance Traveler Discovery – Searching for software".

So, I don't think it's RESOLVED INVALID.
Comment 4 Aleix Pol 2018-04-06 18:27:01 UTC
@Antonio: We never do "pkcon search", we do "appstreamcli search".
Sometimes it's found because we do have an exact match for package name just to make it doable.
AppStream does have a fallback system that maybe is not working in this case? I'm not sure about that, it can be investigated.
Comment 5 Aleix Pol 2018-04-06 18:29:21 UTC
@Antonio, do you know how Vlad could get appstream metadata for these repos?
Comment 6 Antonio Rojas 2018-04-06 22:01:07 UTC
Maybe I'm missing something, but I don't think this has anything to do with appstream, but with the exact name match you mentioned. IIUC what Vlad is asking for is:
- Being able to find locally installed packages by searching for a substring, not just with the full package name
- Also show locally installed packages when you are in the "Applications" menu, not only in the top-level menu (this one I don't agree with, since packages don't necessarily contain applications)
Comment 7 Aleix Pol 2018-04-07 00:11:32 UTC
I discussed this issue a bit with Klumpp (AppStream maintainer), he came up with the following fix that will solve the issue.
https://github.com/ximion/appstream/commit/7a0059253859eedce21c057e53d91bccd6f18d42