rejigger lookup of services by exec
Needs ReviewPublic

Authored by sitter on May 7 2020, 12:43 PM.



previously we'd simply query for an Exec that contains the primary query
word. that is actually fairly unreliable because that will also match
on env vars, arguments and the like which then has opportunity to produce
false positives.

notably examples is the konversation flatpak which matches 'ding' because
it has a --forwarding argument in the Exec line and then even gets a
relevance bump because it is a KDE application, so suddenly it outscores
the actual ding application.

to deal with this some rejiggering is necessary. we now query for potential
Exec matches in its own query so we can tell which services are general
matches and which are Exec matches. we'll then reduce the exec matches
down to the ones that aren't already service matches AND where the actual
executable name contains the primary query.

Test Plan

test passes, konversation is no longer reported as match for 'ding' in kickoff

Diff Detail

R120 Plasma Workspace
No Linters Available
No Unit Test Coverage
Build Status
Buildable 26833
Build 26851: arc lint + arc unit
sitter created this revision.May 7 2020, 12:43 PM
Restricted Application added a project: Plasma. · View Herald TranscriptMay 7 2020, 12:43 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
sitter requested review of this revision.May 7 2020, 12:43 PM
anthonyfieroni added inline comments.

It should be %4 instead of %5

sitter updated this revision to Diff 82731.May 13 2020, 1:10 PM