Fix bugs in loading plugin set
Fixes in the LoadPluginSet() function:
- the naming scheme for backend libraries is "libTYPE.so", where TYPE
is the backend type (e.g. for tpk it should load libtpk.so)
- elements of the global plugin_set_list array should be allocated
every time a new backend library is loaded as this behaviour is
expected by the backend api: pkg_plugin_on_load() function expects
its input parameter to be an already allocated memory area, otherwise
it returns -1 and the LoadPluginSet() reports a failure:
extern "C" int pkg_plugin_on_load(pkg_plugin_set* set) {
if (set == nullptr)
return -1;
set->plugin_on_unload = PluginOnUnload;
...
}
Change-Id: I603030871a28f050f1d87ce572c102c3d0b5dc90