Bug 249848 - Can the scope of a patch be null
Summary: Can the scope of a patch be null
Status: RESOLVED FIXED
Alias: None
Product: Equinox
Classification: Eclipse Project
Component: p2 (show other bugs)
Version: 3.5   Edit
Hardware: PC Mac OS X - Carbon (unsup.)
: P3 normal (vote)
Target Milestone: 3.5 M3   Edit
Assignee: Pascal Rapicault CLA
QA Contact:
URL:
Whiteboard:
Keywords: api
Depends on:
Blocks:
 
Reported: 2008-10-06 14:19 EDT by Pascal Rapicault CLA
Modified: 2008-10-07 21:16 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Pascal Rapicault CLA 2008-10-06 14:19:33 EDT
In bug 249283, it got discovered that a patch with a null scope would not apply and also that it would cause problems while persisting.
We need to make a clear statement whether or not the patch scope can be null or not.
Comment 1 Curtis Windatt CLA 2008-10-06 14:30:58 EDT
The behaviour for a patch with a null scope and an empty[] scope was different.  Using a null scope (or failing to set one while creating the patch) results in the planner determining that the patch applies to nothing and will not be installed.  Using an empty scope (empty array) results in the planner assuming the patch applies to everything and proceeding to test whether the required changes apply.

Since I couldn't get a null scope to install, there were no additional problems.  However, after installing a patch with an empty scope, the NPEs showed up trying to read the profile xml.

The reason why I was using an empty scope, was because I did not want to filter based on the provided capabilities of an iu.  I wanted to get every iu with a certain required capability and change it.
Comment 2 Curtis Windatt CLA 2008-10-06 14:33:13 EDT
The actual bug is bug 249483 :)
Comment 3 Pascal Rapicault CLA 2008-10-07 21:16:32 EDT
The scope of a patch can not be null. I have enforced that in the factory and fixed the test cases.