Review Request 121913: Prevent querying attica with invalid categories

Harald Sitter sitter at
Thu Jan 8 09:47:35 UTC 2015

This is an automatically generated e-mail. To reply, visit:

Review request for Kubuntu and Muon Package Management Suite.

Repository: muon


For as of right now unknown reasons looking for providers
plasmoids.knsrc and getting and then asking it for valid
categories can return no category match for plasmoids.
Which in turn makes us query for content pertaining to an invalid category.

What happens is that Provider::searchContents will come back with content
matching every category of that provider (and every name), so we are
looking at thousands of entries in 100-entry batches to receive which is
neither fast nor efficient nor anything really.
To safe guard against this sort of misbehavior explicitly remove all
?possible-category? entries that have not been matched up to a valid
Attica::Category and return if there are none to search for.

Random background:
m_categories keys get filled based on configuration values for possible
resources, only in categoriesLoaded those entries are then matched up with
actual categories the provider knows about. If one of the expected keys
does not exist on the Provider we have a dangling entry in the Map ala
<"Kitten", Category()>. There is no point in hurling those at Attica
regardless of the cause that ultimately causes the present category
problems. This is worsened by the fact that muon-updater needs to wait
for all resources to fetching=false before it can display anything which
means that having KSNBackend stuck in fetching on account of getting
all the data a provider has on everything will block the entire upgrade
and either making it appear as though muon is broken or there are no


  libmuon/backends/KNSBackend/KNSBackend.cpp edc4f0ac6d2060930ab00c698a60cff74ad64107 



without patch: muon-updater never shows anything (as long as opendesktop is resolved as provider, which actually doesn't happen all that often for some reason Oo)

patch & make & make install & muon-updater => everything awesome again


Harald Sitter

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the kubuntu-devel mailing list