After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 682470 - Results from search providers are added twice
Results from search providers are added twice
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: general
3.5.x
Other Linux
: Normal normal
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
Depends on:
Blocks:
 
 
Reported: 2012-08-22 13:34 UTC by Cosimo Cecchi
Modified: 2012-08-22 19:01 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
screenshot (476.64 KB, image/png)
2012-08-22 13:34 UTC, Cosimo Cecchi
  Details
remoteSearch: Don't add providers more than once (1.99 KB, patch)
2012-08-22 14:25 UTC, Florian Müllner
needs-work Details | Review
remoteSearch: Don't add providers more than once (2.69 KB, patch)
2012-08-22 18:54 UTC, Florian Müllner
committed Details | Review

Description Cosimo Cecchi 2012-08-22 13:34:19 UTC
See attached screenshot...scrolling down I see

---
Applications
---
Settings
---
Places and Devices
---
Documents
---
Contacts
---
Documents
---
Contacts
---
Comment 1 Cosimo Cecchi 2012-08-22 13:34:47 UTC
Created attachment 222149 [details]
screenshot
Comment 2 Florian Müllner 2012-08-22 14:06:51 UTC
Yeah, that's a known problem actually - what's happening is that you have duplicated search providers in XDG_DATA_DIRS (most likely the system one and one from jhbuild). I still have an unfinished patch lying around locally somewhere, should get that finished ...
Comment 3 Florian Müllner 2012-08-22 14:25:59 UTC
Created attachment 222157 [details] [review]
remoteSearch: Don't add providers more than once

Currently we load all search providers from XDG_DATA_DIRS, so if
the same provider is installed several times in different directories,
we happily show duplicate results. To fix, keep track of all remote
providers we add and skip those that already have been loaded from a
different directory.

Oh, I was wrong - the unfinished patches were about updating providers when the keyfiles on disk change ... this issue is actually a lot easier to fix.
Comment 4 Cosimo Cecchi 2012-08-22 15:19:25 UTC
Review of attachment 222157 [details] [review]:

Thanks, patch looks good to me
Comment 5 Jasper St. Pierre (not reading bugmail) 2012-08-22 18:16:06 UTC
Review of attachment 222157 [details] [review]:

Not the biggest fan of the global, especially if you don't re-set it for every loadRemoteSearchProviders call. I'd be happiest if you passed a dictionary along.
Comment 6 Florian Müllner 2012-08-22 18:54:55 UTC
Created attachment 222179 [details] [review]
remoteSearch: Don't add providers more than once

Sure ...
Comment 7 Jasper St. Pierre (not reading bugmail) 2012-08-22 18:59:04 UTC
Review of attachment 222179 [details] [review]:

Thanks.
Comment 8 Florian Müllner 2012-08-22 19:01:26 UTC
Attachment 222179 [details] pushed as 56dc2eb - remoteSearch: Don't add providers more than once