Question

Introduction: I asked this question on the P2-forum already but I couldnt get any answer yet and this question is very important to me since it is blocking my work completely

I am in the need of patching the current Mylyn-Context.Core Feature, so I checked out the plugin org.eclipse.mylyn.context.core (3.6.1), created a fix and updated the version to 3.6.2. Afterwards I created a feature-patch project which patches org.eclipse.mylyn.context_feature in version 3.6.1.v20110728-0200. I added my patched plugin to the dependencies of the feature.

When I export a p2-repository (inlcuding the feature with the plugin that needs the patch) I get a folderstructure that looks correct. All features and plugins are there with the right version.

When I am installing the patch, P2 doesn't complain about missing requirements and installs without errors.

Now the problem is that within the plugins folder of eclipse there is only org.eclipse.mylyn.context.core in version 3.6.1.... but not 3.6.2 hence my plugin isnt working. The strange part is, that the patch-feature is installed but it doesnt complain about a missing bundle (the patched 3.6.2).

I compared the contents.xml to a patch from the Oracle OEPE Tools and it looks like everything is correct.

Can someone help me out here. I am trying to fix this since two weeks without getting any step further.

Thanks in advance Marc

P.S. I added the generated content.xml from the generated P2-Repository

<?xml version='1.0' encoding='UTF-8'?>
<?metadataRepository version='1.1.0'?>
<repository name='Exported Repository' type='org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository' version='1'>
  <properties size='2'>
    <property name='p2.timestamp' value='1313492070954'/>
    <property name='p2.compressed' value='true'/>
  </properties>
  <units size='7'>
    <unit id='org.eclipse.mylyn.context.core' version='3.6.2'>
      <update id='org.eclipse.mylyn.context.core' range='[0.0.0,3.6.2)' severity='0'/>
      <properties size='5'>
        <property name='df_LT.Bundle-Vendor' value='Eclipse Mylyn'/>
        <property name='df_LT.Bundle-Name' value='Mylyn Context Core'/>
        <property name='org.eclipse.equinox.p2.name' value='%Bundle-Name'/>
        <property name='org.eclipse.equinox.p2.provider' value='%Bundle-Vendor'/>
        <property name='org.eclipse.equinox.p2.bundle.localization' value='plugin'/>
      </properties>
      <provides size='6'>
        <provided namespace='org.eclipse.equinox.p2.iu' name='org.eclipse.mylyn.context.core' version='3.6.2'/>
        <provided namespace='osgi.bundle' name='org.eclipse.mylyn.context.core' version='3.6.2'/>
        <provided namespace='java.package' name='org.eclipse.mylyn.context.core' version='0.0.0'/>
        <provided namespace='java.package' name='org.eclipse.mylyn.internal.context.core' version='0.0.0'/>
        <provided namespace='org.eclipse.equinox.p2.eclipse.type' name='bundle' version='1.0.0'/>
        <provided namespace='org.eclipse.equinox.p2.localization' name='df_LT' version='1.0.0'/>
      </provides>
      <requires size='3'>
        <required namespace='osgi.bundle' name='org.eclipse.core.runtime' range='0.0.0'/>
        <required namespace='osgi.bundle' name='org.eclipse.mylyn.commons.core' range='[3.0.0,4.0.0)'/>
        <required namespace='osgi.bundle' name='org.eclipse.mylyn.monitor.core' range='[3.0.0,4.0.0)'/>
      </requires>
      <artifacts size='1'>
        <artifact classifier='osgi.bundle' id='org.eclipse.mylyn.context.core' version='3.6.2'/>
      </artifacts>
      <touchpoint id='org.eclipse.equinox.p2.osgi' version='1.0.0'/>
      <touchpointData size='1'>
        <instructions size='1'>
          <instruction key='manifest'>
            Bundle-RequiredExecutionEnvironment: J2SE-1.5&#xA;Bundle-Name: %Bundle-Name&#xA;Bundle-Activator: org.eclipse.mylyn.internal.context.core.ContextCorePlugin&#xA;Manifest-Version: 1.0&#xA;Bundle-Vendor: %Bundle-Vendor&#xA;Bundle-ClassPath: .&#xA;Bundle-ActivationPolicy: lazy&#xA;Bundle-SymbolicName: org.eclipse.mylyn.context.core;singleton:=true&#xA;Bundle-ManifestVersion: 2&#xA;Bundle-Version: 3.6.2&#xA;Bundle-Localization: plugin&#xA;Export-Package: org.eclipse.mylyn.context.core,org.eclipse.mylyn.internal.context.core;x-friends:=&quot;org.eclipse.mylyn.context.ui&quot;&#xA;Require-Bundle: org.eclipse.core.runtime,org.eclipse.mylyn.commons.core;bundle-version=&quot;[3.0.0,4.0.0)&quot;,org.eclipse.mylyn.monitor.core;bundle-version=&quot;[3.0.0,4.0.0)&quot;
          </instruction>
        </instructions>
      </touchpointData>
    </unit>
    <unit id='custom.mylyn.extensions.feature.feature.group' version='0.0.1.201108161254' singleton='false'>
      <update id='custom.mylyn.extensions.feature.feature.group' range='[0.0.0,0.0.1.201108161254)' severity='0'/>
      <properties size='5'>
        <property name='org.eclipse.equinox.p2.name' value='Mylyn Custom Extensions'/>
        <property name='org.eclipse.equinox.p2.description' value='[Enter Feature Description here.]'/>
        <property name='org.eclipse.equinox.p2.description.url' value='http://www.example.com/description'/>
        <property name='org.eclipse.equinox.p2.provider' value='Marc Schlegel'/>
        <property name='org.eclipse.equinox.p2.type.group' value='true'/>
      </properties>
      <provides size='1'>
        <provided namespace='org.eclipse.equinox.p2.iu' name='custom.mylyn.extensions.feature.feature.group' version='0.0.1.201108161254'/>
      </provides>
      <requires size='11'>
        <required namespace='org.eclipse.equinox.p2.iu' name='custom.mylyn.extensions.patchfeature.feature.group' range='[0.0.1.201108161254,0.0.1.201108161254]'/>
        <required namespace='org.eclipse.equinox.p2.iu' name='org.eclipse.core.runtime' range='3.6.0'/>
        <required namespace='org.eclipse.equinox.p2.iu' name='org.eclipse.ui' range='0.0.0'/>
        <required namespace='org.eclipse.equinox.p2.iu' name='org.eclipse.core.resources' range='3.6.1'/>
        <required namespace='org.eclipse.equinox.p2.iu' name='custom.mylyn.extensions.core' range='0.0.1'/>
        <required namespace='org.eclipse.equinox.p2.iu' name='org.eclipse.mylyn.commons.core' range='3.6.0'/>
        <required namespace='org.eclipse.equinox.p2.iu' name='org.eclipse.mylyn.tasks.core' range='3.6.0'/>
        <required namespace='org.eclipse.equinox.p2.iu' name='org.eclipse.mylyn.context.core' range='3.6.1'/>
        <required namespace='org.eclipse.equinox.p2.iu' name='custom.mylyn.extensions.ui.view' range='[0.0.1.201108161254,0.0.1.201108161254]'/>
        <required namespace='org.eclipse.equinox.p2.iu' name='custom.mylyn.extensions.core' range='[0.0.1.201108161254,0.0.1.201108161254]'/>
        <required namespace='org.eclipse.equinox.p2.iu' name='custom.mylyn.extensions.feature.feature.jar' range='[0.0.1.201108161254,0.0.1.201108161254]'>
          <filter>
            (org.eclipse.update.install.features=true)
          </filter>
        </required>
      </requires>
      <touchpoint id='null' version='0.0.0'/>
      <licenses size='1'>
        <license uri='http://www.example.com/license' url='http://www.example.com/license'>
          [Enter License Description here.]
        </license>
      </licenses>
      <copyright uri='http://www.example.com/copyright' url='http://www.example.com/copyright'>
        [Enter Copyright Description here.]
      </copyright>
    </unit>
    <unit id='custom.mylyn.extensions.patchfeature.feature.group' version='0.0.1.201108161254' singleton='false'>
      <patchScope>
        <scope>
          <requires size='1'>
            <required namespace='org.eclipse.equinox.p2.iu' name='org.eclipse.mylyn.context_feature.feature.group' range='[3.6.1.v20110728-0200,3.6.1.v20110728-0200]'/>
          </requires>
        </scope>
      </patchScope>
      <changes>
        <change>
          <from>
            <required namespace='org.eclipse.equinox.p2.iu' name='org.eclipse.mylyn.context.core' range='0.0.0'/>
          </from>
          <to>
            <required namespace='org.eclipse.equinox.p2.iu' name='org.eclipse.mylyn.context.core' range='[3.6.2,3.6.2]'/>
          </to>
        </change>
      </changes>
      <lifeCycle>
        <required namespace='org.eclipse.equinox.p2.iu' name='org.eclipse.mylyn.context_feature.feature.group' range='[3.6.1.v20110728-0200,3.6.1.v20110728-0200]' greedy='false'/>
      </lifeCycle>
      <update id='custom.mylyn.extensions.patchfeature.feature.group' range='[0.0.0,0.0.1.201108161254)' severity='0'/>
      <properties size='5'>
        <property name='org.eclipse.equinox.p2.type.patch' value='true'/>
        <property name='org.eclipse.equinox.p2.name' value='Mylyn Custom Extensions Patch'/>
        <property name='org.eclipse.equinox.p2.description' value='This patch is necessary to add API capabilities to Mylyns context-core.'/>
        <property name='org.eclipse.equinox.p2.provider' value='Marc Schlegel'/>
        <property name='org.eclipse.equinox.p2.type.group' value='true'/>
      </properties>
      <provides size='1'>
        <provided namespace='org.eclipse.equinox.p2.iu' name='custom.mylyn.extensions.patchfeature.feature.group' version='0.0.1.201108161254'/>
      </provides>
      <requires size='1'>
        <required namespace='org.eclipse.equinox.p2.iu' name='custom.mylyn.extensions.patchfeature.feature.jar' range='[0.0.1.201108161254,0.0.1.201108161254]'>
          <filter>
            (org.eclipse.update.install.features=true)
          </filter>
        </required>
      </requires>
      <touchpoint id='null' version='0.0.0'/>
      <licenses size='1'>
        <license uri='http://www.example.com/license' url='http://www.example.com/license'>
          [Enter License Description here.]
        </license>
      </licenses>
      <copyright uri='http://www.example.com/copyright' url='http://www.example.com/copyright'>
        [Enter Copyright Description here.]
      </copyright>
    </unit>
    <unit id='custom.mylyn.extensions.core' version='0.0.1.201108161254'>
      <update id='custom.mylyn.extensions.core' range='[0.0.0,0.0.1.201108161254)' severity='0'/>
      <properties size='2'>
        <property name='org.eclipse.equinox.p2.name' value='Mylyn-Extensions-Core'/>
        <property name='org.eclipse.equinox.p2.provider' value='Marc Schlegel'/>
      </properties>
      <provides size='4'>
        <provided namespace='org.eclipse.equinox.p2.iu' name='custom.mylyn.extensions.core' version='0.0.1.201108161254'/>
        <provided namespace='osgi.bundle' name='custom.mylyn.extensions.core' version='0.0.1.201108161254'/>
        <provided namespace='java.package' name='custom.mylyn.extensions.core.context' version='0.0.0'/>
        <provided namespace='org.eclipse.equinox.p2.eclipse.type' name='bundle' version='1.0.0'/>
      </provides>
      <requires size='5'>
        <required namespace='osgi.bundle' name='org.eclipse.mylyn.commons.core' range='3.6.0'/>
        <required namespace='osgi.bundle' name='org.eclipse.mylyn.context.core' range='0.0.0'/>
        <required namespace='osgi.bundle' name='org.eclipse.mylyn.tasks.core' range='3.6.0'/>
        <required namespace='osgi.bundle' name='org.eclipse.core.runtime' range='3.6.0'/>
        <required namespace='osgi.bundle' name='org.eclipse.core.resources' range='3.6.1'/>
      </requires>
      <artifacts size='1'>
        <artifact classifier='osgi.bundle' id='custom.mylyn.extensions.core' version='0.0.1.201108161254'/>
      </artifacts>
      <touchpoint id='org.eclipse.equinox.p2.osgi' version='1.0.0'/>
      <touchpointData size='1'>
        <instructions size='1'>
          <instruction key='manifest'>
            Bundle-ManifestVersion: 2&#xA;Bundle-Name: Mylyn-Extensions-Core&#xA;Bundle-Version: 0.0.1.201108161254&#xA;Require-Bundle: org.eclipse.mylyn.commons.core;bundle-version=&quot;3.6.0&quot;,org.eclipse.mylyn.context.core,org.eclipse.mylyn.tasks.core;bundle-version=&quot;3.6.0&quot;;visibility:=reexport,org.eclipse.core.runtime;bundle-version=&quot;3.6.0&quot;,org.eclipse.core.resources;bundle-version=&quot;3.6.1&quot;&#xA;Export-Package: custom.mylyn.extensions.core.context&#xA;Bundle-RequiredExecutionEnvironment: JavaSE-1.6&#xA;Bundle-SymbolicName: custom.mylyn.extensions.core;singleton:=true&#xA;Manifest-Version: 1.0&#xA;Bundle-Vendor: Marc Schlegel
          </instruction>
        </instructions>
      </touchpointData>
    </unit>
    <unit id='custom.mylyn.extensions.feature.feature.jar' version='0.0.1.201108161254'>
      <properties size='4'>
        <property name='org.eclipse.equinox.p2.name' value='Mylyn Custom Extensions'/>
        <property name='org.eclipse.equinox.p2.description' value='[Enter Feature Description here.]'/>
        <property name='org.eclipse.equinox.p2.description.url' value='http://www.example.com/description'/>
        <property name='org.eclipse.equinox.p2.provider' value='Marc Schlegel'/>
      </properties>
      <provides size='3'>
        <provided namespace='org.eclipse.equinox.p2.iu' name='custom.mylyn.extensions.feature.feature.jar' version='0.0.1.201108161254'/>
        <provided namespace='org.eclipse.equinox.p2.eclipse.type' name='feature' version='1.0.0'/>
        <provided namespace='org.eclipse.update.feature' name='custom.mylyn.extensions.feature' version='0.0.1.201108161254'/>
      </provides>
      <filter>
        (org.eclipse.update.install.features=true)
      </filter>
      <artifacts size='1'>
        <artifact classifier='org.eclipse.update.feature' id='custom.mylyn.extensions.feature' version='0.0.1.201108161254'/>
      </artifacts>
      <touchpoint id='org.eclipse.equinox.p2.osgi' version='1.0.0'/>
      <touchpointData size='1'>
        <instructions size='1'>
          <instruction key='zipped'>
            true
          </instruction>
        </instructions>
      </touchpointData>
      <licenses size='1'>
        <license uri='http://www.example.com/license' url='http://www.example.com/license'>
          [Enter License Description here.]
        </license>
      </licenses>
      <copyright uri='http://www.example.com/copyright' url='http://www.example.com/copyright'>
        [Enter Copyright Description here.]
      </copyright>
    </unit>
    <unit id='custom.mylyn.extensions.ui.view' version='0.0.1.201108161254'>
      <update id='custom.mylyn.extensions.ui.view' range='[0.0.0,0.0.1.201108161254)' severity='0'/>
      <properties size='2'>
        <property name='org.eclipse.equinox.p2.name' value='Mylyn-Extensions-UI'/>
        <property name='org.eclipse.equinox.p2.provider' value='Marc Schlegel'/>
      </properties>
      <provides size='3'>
        <provided namespace='org.eclipse.equinox.p2.iu' name='custom.mylyn.extensions.ui.view' version='0.0.1.201108161254'/>
        <provided namespace='osgi.bundle' name='custom.mylyn.extensions.ui.view' version='0.0.1.201108161254'/>
        <provided namespace='org.eclipse.equinox.p2.eclipse.type' name='bundle' version='1.0.0'/>
      </provides>
      <requires size='4'>
        <required namespace='osgi.bundle' name='org.eclipse.core.runtime' range='3.6.0'/>
        <required namespace='osgi.bundle' name='org.eclipse.ui' range='0.0.0'/>
        <required namespace='osgi.bundle' name='org.eclipse.core.resources' range='0.0.0'/>
        <required namespace='osgi.bundle' name='custom.mylyn.extensions.core' range='0.0.1'/>
      </requires>
      <artifacts size='1'>
        <artifact classifier='osgi.bundle' id='custom.mylyn.extensions.ui.view' version='0.0.1.201108161254'/>
      </artifacts>
      <touchpoint id='org.eclipse.equinox.p2.osgi' version='1.0.0'/>
      <touchpointData size='1'>
        <instructions size='1'>
          <instruction key='manifest'>
            Bundle-ManifestVersion: 2&#xA;Bundle-Version: 0.0.1.201108161254&#xA;Require-Bundle: org.eclipse.core.runtime;bundle-version=&quot;3.6.0&quot;,org.eclipse.ui,org.eclipse.core.resources,custom.mylyn.extensions.core;bundle-version=&quot;0.0.1&quot;&#xA;Manifest-Version: 1.0&#xA;Bundle-SymbolicName: custom.mylyn.extensions.ui.view;singleton:=true&#xA;Bundle-Name: Mylyn-Extensions-UI&#xA;Bundle-RequiredExecutionEnvironment: JavaSE-1.6&#xA;Bundle-Vendor: Marc Schlegel
          </instruction>
        </instructions>
      </touchpointData>
    </unit>
    <unit id='custom.mylyn.extensions.patchfeature.feature.jar' version='0.0.1.201108161254'>
      <properties size='3'>
        <property name='org.eclipse.equinox.p2.name' value='Mylyn Custom Extensions Patch'/>
        <property name='org.eclipse.equinox.p2.description' value='This patch is necessary to add API capabilities to Mylyns context-core.'/>
        <property name='org.eclipse.equinox.p2.provider' value='Marc Schlegel'/>
      </properties>
      <provides size='3'>
        <provided namespace='org.eclipse.equinox.p2.iu' name='custom.mylyn.extensions.patchfeature.feature.jar' version='0.0.1.201108161254'/>
        <provided namespace='org.eclipse.equinox.p2.eclipse.type' name='feature' version='1.0.0'/>
        <provided namespace='org.eclipse.update.feature' name='custom.mylyn.extensions.patchfeature' version='0.0.1.201108161254'/>
      </provides>
      <filter>
        (org.eclipse.update.install.features=true)
      </filter>
      <artifacts size='1'>
        <artifact classifier='org.eclipse.update.feature' id='custom.mylyn.extensions.patchfeature' version='0.0.1.201108161254'/>
      </artifacts>
      <touchpoint id='org.eclipse.equinox.p2.osgi' version='1.0.0'/>
      <touchpointData size='1'>
        <instructions size='1'>
          <instruction key='zipped'>
            true
          </instruction>
        </instructions>
      </touchpointData>
      <licenses size='1'>
        <license uri='http://www.example.com/license' url='http://www.example.com/license'>
          [Enter License Description here.]
        </license>
      </licenses>
      <copyright uri='http://www.example.com/copyright' url='http://www.example.com/copyright'>
        [Enter Copyright Description here.]
      </copyright>
    </unit>
  </units>
</repository>
Was it helpful?

Solution

Found the same issue from bugzilla.

In a word, you are trying to patch a feature not including the plug-in. You should patch "org.eclipse.mylyn_feature".

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top