Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 365124

Summary: Filters on requirements not taken into account when installing features
Product: [Eclipse Project] Equinox Reporter: DJ Houghton <dj.houghton>
Component: p2Assignee: P2 Inbox <equinox.p2-inbox>
Status: CLOSED WONTFIX QA Contact:
Severity: normal    
Priority: P3 CC: pascal
Version: 3.8.0 Juno   
Target Milestone: ---   
Hardware: PC   
OS: Mac OS X - Carbon (unsup.)   
Whiteboard: stalebug
Attachments:
Description Flags
sample repository none

Description DJ Houghton CLA 2011-11-29 14:11:04 EST
Created attachment 207681 [details]
sample repository

I have a case where I am trying to use filters on requirements (not on the actual features themselves) and it appears the filters are not being taken into account during the installation. 

Consider the following use case:
- Feature F1 requires Feature F2
- there is a os=win32 filter on the F1 -> F2 requirement
- Feature F2 requires IU F2.filter
- there is a os=win32 filter on the F2 -> F2.filter requirement
- F2.filter has an os=win32 filter directly on it

When I try to install this set through the UI, both Feature F1 and Feature F2 are installed successfully (on my Mac) and IU F2.filter is not installed. 

Expected behaviour is for nothing to get installed and the UI report an error.

I've constructed a stand-alone test case using the Slicer and it fails correctly. Next I will try building a test case at the Planner level. One thing I've noticed is different between my test case and installing via the UI is the consideration of the container IU (denoted by a timestamp id). 

I'm attaching a zip of a repository with the above example.
Comment 1 DJ Houghton CLA 2011-11-29 15:34:31 EST
I've released a planner-level test case which fails. You can check out Bug365124. In that case I've selected Feature F1 for install and it installs F1.feature.group along with the IU representing the JAR. (but everything not applicable from the filters on the requires is dropped)

I would expect that if some of the requires conditions were not met, then we couldn't install the root. Am I making the wrong assumptions?
Comment 2 Eclipse Genie CLA 2019-09-06 17:56:20 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.