[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[p2-dev] Unexpected resolution failure

Hi,

 

I have a question regarding interpretation of version 0.0.0 on IU installation:

A sample repo (attached) contains 2 bundles with the same symbolic name but different versions. The bundle with the higher version has a missing requirement.

When trying to install the bundle without explicitly specifying a version (or using 0.0.0) the installation fails with the following message:

 

Installing Test000 1.0.1.201109261256.

Installation failed.

Cannot complete the install because one or more required items could not be found.

Software being installed: Test000 1.0.1.201109261256 (Test000 1.0.1.201109261256)

Missing requirement: Test000 1.0.1.201109261256 (Test000 1.0.1.201109261256) requires 'package my.missing.package 0.0.0' but it could not be found

 

It seems that 0.0.0 is interpreted as [1.0.1.201109261256, 1.0.1.201109261256] instead of [0.0.0, infinity) and p2 resolver doesn’t make an attempt to find a solution containing lower version.

Is that the expected behavior?

 

Thank you,

Katya

<?xml version='1.0' encoding='UTF-8'?>
<?metadataRepository version='1.1.0'?>
<repository name='file:/C:/work/p2/test000repo/ - metadata' type='org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository' version='1'>
  <properties size='2'>
    <property name='p2.timestamp' value='1317034690132'/>
    <property name='p2.compressed' value='false'/>
  </properties>
  <units size='2'>
    <unit id='Test000' version='1.0.0.201109261256' singleton='false'>
      <update id='Test000' range='[0.0.0,1.0.0.201109261256)' severity='0'/>
      <properties size='1'>
        <property name='org.eclipse.equinox.p2.name' value='Test000'/>
      </properties>
      <provides size='3'>
        <provided namespace='org.eclipse.equinox.p2.iu' name='Test000' version='1.0.0.201109261256'/>
        <provided namespace='osgi.bundle' name='Test000' version='1.0.0.201109261256'/>
        <provided namespace='org.eclipse.equinox.p2.eclipse.type' name='bundle' version='1.0.0'/>
      </provides>
      <requires size='1'>
        <required namespace='java.package' name='org.osgi.framework' range='1.3.0'/>
      </requires>
      <artifacts size='1'>
        <artifact classifier='osgi.bundle' id='Test000' version='1.0.0.201109261256'/>
      </artifacts>
      <touchpoint id='org.eclipse.equinox.p2.osgi' version='1.0.0'/>
      <touchpointData size='1'>
        <instructions size='1'>
          <instruction key='manifest'>
            Bundle-SymbolicName: Test000&#xA;Bundle-Version: 1.0.0.201109261256&#xA;
          </instruction>
        </instructions>
      </touchpointData>
    </unit>
    <unit id='Test000' version='1.0.1.201109261256' singleton='false'>
      <update id='Test000' range='[0.0.0,1.0.1.201109261256)' severity='0'/>
      <properties size='1'>
        <property name='org.eclipse.equinox.p2.name' value='Test000'/>
      </properties>
      <provides size='3'>
        <provided namespace='org.eclipse.equinox.p2.iu' name='Test000' version='1.0.1.201109261256'/>
        <provided namespace='osgi.bundle' name='Test000' version='1.0.1.201109261256'/>
        <provided namespace='org.eclipse.equinox.p2.eclipse.type' name='bundle' version='1.0.0'/>
      </provides>
      <requires size='1'>
        <required namespace='java.package' name='my.missing.package' range='0.0.0'/>
      </requires>
      <artifacts size='1'>
        <artifact classifier='osgi.bundle' id='Test000' version='1.0.1.201109261256'/>
      </artifacts>
      <touchpoint id='org.eclipse.equinox.p2.osgi' version='1.0.0'/>
      <touchpointData size='1'>
        <instructions size='1'>
          <instruction key='manifest'>
            Bundle-SymbolicName: Test000&#xA;Bundle-Version: 1.0.1.201109261256&#xA;
          </instruction>
        </instructions>
      </touchpointData>
    </unit>
  </units>
</repository>