On Thu, 2009-11-19 at 15:24 +0100, Jiri Moskovcak wrote:
> run tested it - BUMMER! "RunApp plugin is not
loaded"!
>
> Yep, I need to add it to EnabledPlugins.
>
> I am afraid a lot of users will bitch "wtf, can't this damn
> program understand that if I said ActionsAndReporters = abc,
> them obviously abc plugin should be loaded?"
>
> And they are right - abrt can figure it out.
>
> It can be easily done without resorting to scanning every .conf
> directive for plugin names: instead, we can teach GetAction(pluginName),
> GetReporter() et al. to try to load the plugin if it is not loaded yet,
> and complain only when load attempt fails.
>
> Currently, it errors out with "Plugin '%s' is not registered"
> if plugin is not registered. It may well just register it, and continue.
>
> This way, EnabledPlugins = ... directive will mean "load these plugins
> right at the start" - because some of them, like ccpp, do important
> initialization. And pludins which do not have important things to do
> at initialization won't need to be listed there.
>
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...
>
1. 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"
--
vda