|Re: Cleaning up Virgo repository [message #830102 is a reply to message #830077]
||Tue, 27 March 2012 07:38
| Glyn Normington
Registered: July 2009
There seem to be three categories of unnecessary bundles in the repository, only one of which seems feasible to detect automatically as far as I can see.|
- Bundles which are not installed at runtime. Trivial to detect by diffing the runtime state against the repository.
- Bundles which are installed but are not depended upon (NB. this includes all kinds of dependencies: package, service, bundle, fragment). Typically, bundled libraries do not publish or consume services, so that makes things a bit simpler. Not too bad to detect as the wiring can be inspected using standard OSGi APIs to detect orphaned groups of bundles. However, the "fly in the ointment" is as follows. Since these bundles were installed at all, some of them must have been explicitly deployed via pickup, deployer API, present in a deployed plan, etc.. I can't see how tooling could know which explicitly deployed bundles were intentionally present and which were unintentionally present. I think it is up to the user to trim back the list of explicitly deployed bundles according to their requirements.
- Bundles which are installed and which satisfy optional dependencies (which Spring, for example, has lots of) of necessary bundles but which aren't really needed. This also appears impossible to detect automatically.
Is there a flaw in my analysis?
Powered by FUDForum
. Page generated in 0.02341 seconds