rejigger lookup of services by exec
Needs ReviewPublic

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

Details

Reviewers
broulik
Summary

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

Repository
R120 Plasma Workspace
Branch
master
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 26833
Build 26851: arc lint + arc unit
sitter created this revision.Thu, May 7, 12:43 PM
Restricted Application added a project: Plasma. · View Herald TranscriptThu, May 7, 12:43 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
sitter requested review of this revision.Thu, May 7, 12:43 PM
anthonyfieroni added inline comments.
runners/services/servicerunner.cpp
164–165

It should be %4 instead of %5

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

s/%5/%4