Bug 430474 - p2 does not constrain installation based on BREE of bundles
Summary: p2 does not constrain installation based on BREE of bundles
Status: CLOSED DUPLICATE of bug 346174
Alias: None
Product: Equinox
Classification: Eclipse Project
Component: p2 (show other bugs)
Version: unspecified   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: P2 Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 423734
  Show dependency tree
 
Reported: 2014-03-16 09:16 EDT by Markus Knauer CLA
Modified: 2014-03-17 10:49 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Markus Knauer CLA 2014-03-16 09:16:38 EDT
With Eclipse Luna we've got the following scenario:

Some projects (e.g. the LinuxTools project) are using JavaSE-1.7 as a BREE. If you are running your Eclipse IDE with a 1.6 JRE, you are still allowed to install such bundles with p2 without warning from the Luna repository. This scenario per se is not new with Luna, it could have happened with other JRE versions and other bundles in other release trains.

While it is probably not possible (or advisable) to prohibit this installation, I would have expected a warning message.

I confirmed this with one of the Luna M6 packages by installing the LinuxTools features. After a restart these bundles weren't activated (as expected). This is the (predictable, and from an OSGi point of view expected) result after installing such bundles with non-matching BREE. For this example I randomly picked one of the bundles from one of the projects:

osgi> ss org.eclipse.linuxtools.systemtap.ui.systemtapgui
id	State       Bundle
516	RESOLVED    org.eclipse.linuxtools.systemtap.ui.systemtapgui_2.0.0.201402131102

osgi> diag 516
org.eclipse.linuxtools.systemtap.ui.systemtapgui [516]
  No resolution report for the bundle.

osgi> headers 516
Bundle headers:
 ...
 Bundle-ActivationPolicy = lazy
 Bundle-RequiredExecutionEnvironment = JavaSE-1.7
 ...
 Bundle-SymbolicName = org.eclipse.linuxtools.systemtap.ui.systemtapgui;singleton:=true
 ...

osgi> start 516
gogo: BundleException: Error starting module.
Comment 1 Pascal Rapicault CLA 2014-03-17 10:49:49 EDT
This is indeed a known issue. The solution involves making available the actual JRE being used by Eclipse. This has been discussed in bug #346174.

*** This bug has been marked as a duplicate of bug 346174 ***