如何修补功能吧? (没有插件安装Feature-Patch)

时间:2011-08-22 11:03:01

标签: eclipse patch p2

简介:我已经在P2论坛上提出了这个问题,但我还没有得到任何答案,这个问题对我来说非常重要,因为它完全阻止了我的工作

我需要修补当前的Mylyn-Context.Core功能,所以我检查了插件org.eclipse.mylyn.context.core(3.6.1),创建了一个修复程序并将版本更新为3.6。 2。 之后我创建了一个功能补丁项目,它在版本3.6.1.v20110728-0200中修补了org.eclipse.mylyn.context_feature。 我将修补的插件添加到功能的依赖项中。

当我导出p2-repository(包含需要补丁的插件的功能)时,我得到一个看起来正确的文件夹结构。所有功能和插件都有正确的版本。

当我安装补丁时,P2不会抱怨缺少要求和安装而没有错误。

现在问题是在eclipse的plugins文件夹中只有版本3.6.1中的org.eclipse.mylyn.context.core ....但不是3.6.2因此我的插件无法正常工作。 奇怪的是,补丁功能已经安装,但它没有抱怨丢失的捆绑(补丁3.6.2)。

我将contents.xml与Oracle OEPE Tools中的补丁进行了比较,看起来一切都是正确的。

有人可以帮助我吗?我试图解决这个问题,因为两个星期没有采取任何进一步措施。

提前致谢 马克

P.S。我从生成的P2-Repository

添加了生成的content.xml
<?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>

1 个答案:

答案 0 :(得分:1)

bugzilla找到相同的问题。

总之,您正在尝试修补不包含插件的功能。你应该修补“org.eclipse.mylyn_feature”。