|Re: [equinox-dev] triggering the storage adaptor questoin|
This is a tricky one. If a supplementer bundle is installed after a bundle it is supplementing then it will be too late for you to modify the bundle you are supplementing. This is because it has already been added to the state. Doing a Bundle.update() of the bundle you are supplementing may be required, but following it by a PackageAdmin.refreshPackages will likely cause quite a bit of flux if you are installing a bunch of supplementer bundles at one time. Each installation would trigger a refreshPackages operation (which BTW is an async operation).
I would suggest not doing a PackageAdmin.refreshPackages and instead just doing the update() operation and then depending on the installer doing the refreshPackages for you. Currently update.configurator will call refreshPackages after it has uninstalled/installed a group of bundles. This should force the resolver to pick up the new supplemented data that you provided. If the bundle is installed by a reference URL then it should be as simple as calling Bundle.update() with no params. This should cause the storagehook for the supplemented bundle to be called and allow you to supplement it.
Hope that makes sense. If not come to equinox-dev IRC and we can discuss next week.
Martin Lippert ---02/01/2008 04:22:47 PM---Hi!
Martin Lippert <lippert@xxxxxxx>
Equinox Project <equinox-dev@xxxxxxxxxxx>
02/01/2008 04:22 PM
[equinox-dev] triggering the storage adaptor questoin