Bug 30849 - Unable to patch if optional features are not present
Summary: Unable to patch if optional features are not present
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Update (deprecated - use Eclipse>Equinox>p2) (show other bugs)
Version: 2.0.2   Edit
Hardware: PC Windows 2000
: P1 blocker (vote)
Target Milestone: 2.1 RC1   Edit
Assignee: Dejan Glozic CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-02-04 02:33 EST by Steve Francisco CLA
Modified: 2003-02-11 11:37 EST (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 Steve Francisco CLA 2003-02-04 02:33:51 EST
If an optional feature is not installed, an attempt to patch the feature that 
includes the optional feature fails after pressing the "Install" button with 
the following message:
(X) Requested operation cannot be performed because it would invalidate the 
current configuration.
The details say:
<feature name> (version): Older version of feature "optional feature name 
(version)" must be present for a patch to be applied.

I have a simple example of this that I can supply.  The feature hierarchy looks 
like this:
   + master 1.0.0 (root feature)
   |
   '--+ ftrA 1.0.0  (feature that will be patched)
      |
      '--- ftrA.opt 1.0.0  (optional feature)

So feature "master" includes feature "ftrA" which optionally 
includes "ftrA.opt".  Now if a new patch (fix1) is attempted to install and has 
the following feature.xml, it will fail as described:
    <?xml version="1.0" encoding="UTF-8"?>
    <feature id="fix1" image="wsFeatUpdate.jpg"
        label="%featureName" provider-name="abc" version="1.0.0"
        colocation-affinity="master">
        <description>fix1 will install ftrA version 1.0.0.1</description>
        <license url="%licenseURL">This is for test purposes</license>
        <includes id="ftrA" match="equivalent" version="1.0.0.1"/>
        <requires>
            <import feature="master" version="1.0.0" patch="true"/>
        </requires>
        <plugin id="fix1" version="1.0.0"/>
    </feature>

Since ftrA.opt is optional, it should be acceptable to update ftrA independent 
of it.  It doesn't seem to matter if the patch="true" attribute is set.

This is a blocker because this blocks us from updating our product in the field.
Comment 1 Christophe Elek CLA 2003-02-04 08:42:55 EST
Reviewed issue. The problem occurs when the efix feature includes an optional
feature. The optional feature seems to be needed in the remote site for the
install to work but breaks the activity constraints.

2.1 M4 latest Nightly build allows install if added to the batch update but it
installs the optional feature.

Comment 2 Dejan Glozic CLA 2003-02-04 09:42:22 EST
What Eclipse release do you want the fix in? We can provide the fix in 2.1, but 
will that work for you?
Comment 3 Steve Francisco CLA 2003-02-04 17:13:02 EST
Fix is requires on 2.0.2 stream.  We currently have 2.0.2.1 version of the 
platform plugins.
Comment 4 Dejan Glozic CLA 2003-02-04 17:53:38 EST
Ack.

Since we have identified another critical problem related to e-fixes and there 
is a JDT bug that is required, we will probably roll 2.0.3 release including 
all three.
Comment 5 Dejan Glozic CLA 2003-02-05 13:26:54 EST
Steve, can you attach a sample that you mentioned in the report (the one that 
demonstrates the problem)?
Comment 6 Dejan Glozic CLA 2003-02-10 18:03:32 EST
Fixed in 2.0.3, need to move the fix to 2.1 as well.
Comment 7 Dejan Glozic CLA 2003-02-11 11:37:00 EST
Fixed in 2.1