Comment 14 for bug 1628074

Revision history for this message
Peter Levi (peterlevi) wrote :

I'm not 100% sure this specific bug is worth patching. Various sources have stayed temporarily broken before due to website changes, and most users are kind of accustomed to this sort of breakage. This is actually one of the reasons I want to drop any non-API sources from Variety - they are a PITA to support and maintain.

But if you feel this is worth releasing a patch, I think it is better to "operate" the source completely rather than just hiding it from the UI. The change is very simple, and fairly risk-free from introducing regressions. The mentioned trunk commit http://bazaar.launchpad.net/~peterlevi/variety/trunk/revision/558 contains exactly the necessary changes, nothing less, nothing more. Only variety.pot file needs to be regenerated afterwards.
Btw, this commit gives a good "recipe" for which places in the code need touching when removing or adding a new source in the current non-pluginnable state of affairs.

Regarding auto-removal of dead sources from the config:
It is an intentional side-effect :) Basically Variety only loads from the config sources whose types it recognises and shows them in the preferences. So sources with type "wn" will not be loaded at all once support for it is removed. On the other hand, once preferences are persisted (and this happens automatically in various places), the config file is simply dumped from the currently loaded settings, so if a source wasn't there, it is removed from the config file as well. Hence - clean config with only the supported sources remaining there.