| Summary: | PackageAdmin.refreshPackages() refreshes all updated bundles, not only those in the export package graph | ||
|---|---|---|---|
| Product: | [Eclipse Project] Equinox | Reporter: | KP <pollentierk> |
| Component: | Framework | Assignee: | equinox.framework-inbox <equinox.framework-inbox> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | minor | ||
| Priority: | P3 | CC: | tjwatson |
| Version: | 3.6.1 | ||
| Target Milestone: | 3.7 M3 | ||
| Hardware: | PC | ||
| OS: | Windows XP | ||
| Whiteboard: | |||
|
Description
KP
You will also note the spec says: "The technique by which this is accomplished may vary among different Framework implementations. One permissible implementation is to stop and restart the Framework." This means that it is compliant to refresh all bundles. So I don't think you can argue a framework is not compliant if it refreshes more bundles than are necessary. It is not-compliant if it refreshes less bundles than are necessary. That is, the spec specifies the lower bound for the bundles to be refreshed, not the upper bound. Thus I think Equinox complies properly with the spec here. I agree that this is not intuitive behavior. I also agree with BJ that it is not in violation of the specification. I noticed this odd behavior while working on bug326011. The resolver was pulling in all removal pending bundles no matter what was passed to refreshPackages. Now we only pull in all removal pending bundles when you pass null. Please test out the latest 3.7 integration build. (In reply to comment #1) > You will also note the spec says: "The technique by which this is accomplished > may vary among different Framework implementations. One permissible > implementation is to stop and restart the Framework." This means that it is > compliant to refresh all bundles. > > So I don't think you can argue a framework is not compliant if it refreshes > more bundles than are necessary. It is not-compliant if it refreshes less > bundles than are necessary. That is, the spec specifies the lower bound for the > bundles to be refreshed, not the upper bound. > > Thus I think Equinox complies properly with the spec here. Well, that's indeed where the spec seems a bit ambiguous. I know that it says something about the framework being free to choose its implementation (even allowing it to simply restart), BUT, that is only in the paragraph "If no bundles are specified,....". Which suggest this is only related to the cases where the bundles argument is null. Or maybe not, but then this may be something that should be clarified by the OSGi Alliance (and made more clear in their spec, just to avoid confusion) ? As T.Watson states in the previous comment, the behavior Equinox showed wasn't intuitive when reading the current spec. The current spec has an (extended) explanation based on the export-package relations, so it's strange that Equinox would do something different (i.e. have a number of undocumented/unspecified side-effects). |