Meng Xin Zhu

Recently our installer met a strange bug, it didn’t uninstall all legacy bundles after updating to new version. Finally I found it’s due to a magic fragment is missing in the profile due to some causes.

                                                                                                                                      installBundle(bundle:${artifact})                                 uninstallBundle(bundle:${artifact})                    

          </instruction>
                      setStartLevel(startLevel:4);          
        </instructions>
      </touchpointData>
    </unit>

It has ‘hostRequirements’ element that represents it’s a fragment IU and match all the eclipse’s plug-ins in that profile. And this fragment defines the touch point actions for its hosts that will do installBundle action during ‘install’ phrase and uninstallBundle action during ‘uninstall’ phrase. It’s a very good way to remove the duplicate touch point definitions for all eclipse’s plug-ins in the profile.

BTW, p2’s engine also doesn’t attach this fragment to the eclipse’s plug-in IU if the top level IU doesn’t have the STRICT rule. I’m not sure the root cause of designing for it, but it’s the fact.