On 11/20/2009 05:25 PM, Denys Vlasenko wrote:
On Thu, 2009-11-19 at 15:44 +0100, Denys Vlasenko wrote:
Ok, I agree here, that action plugins (and reporters as they are required by some analyzers??) may be enabled on demand without being listed in config file explicitly, so user doesn't even have to know that the "action" is done by some plugin. But I think it would be great to do some more surgery into abrt.conf e.g. move analyzer - reporter association from abrt.conf to per plugin conf.
Actually, now that I looked at the code, I have a tangential question - why we load *all* plugins, then *register* only some of them? This means unused plugins still take up some memory, right? Why do we need two different concepts of "loaded" and "registered"? One might be enough...
- load all plugins to determine which plugins do we have (as we can't
trust the config file :)) 2. enable (run init() at least I hope it works that way) only those plugins we want (listed in conf file)
So what is the proposal here? To load and enable all installed plugins?
Load and enable all plugins mentioned on 'EnabledPlugins = ...' line. Then, if while executing any other directive we see a plugin which is not loaded, load and enable it.
In C++ terms, "we see" means "GetAction(pluginName), GetReporter(pluginName), etc are called"
Here is the patch which implements this.
With it, only EnabledPlugins = CCpp is needed.
Other plugins are loaded when they are used for the first time. For example, KerneloopsScanner plugin is loaded at the first Cron run. RunApp plugin is loaded when a ccpp crash happens. Bugzilla plugin is loaded when user decides to submit the bug.
Hm, how does it work with gui, you can't change settings for disabled plugin, so I guess it doesn't go well.
J.
I run tested it: bot ccpp crashes and kernel oopses are detected.
-- vda