[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[p2-dev] P2 director and conflicting dependencies

Hi There,

We are having some P2-related problems with our installer and I was
hoping to get a pointer in the right direction as to the root cause.  It
is probably something I am doing wrong when hacking the metadata, but
I'd like to also be sure it isn't a P2 bug.

Basically, to simplify things this is the situation I am seeing.  I have
a top-level feature similar to the Eclipse SDK feature that includes
other, nested features:

my.uber.feature
    +-my.feature.1
    +-my.feature.2

And if you look really close, the features "my.feature.1" and
"my.feature.2" also contain/include other features, but they are hidden
from the UI by setting "org.eclipse.equinox.p2.type.group=false" in
p2.inf.  Let's say that both "my.feature.1" and "my.feature.2" include
another feature called "my.hidden.feature", and *everything* is version
1.0.0, so I have this:

my.uber.feature_v1.0.0
    +-my.feature.1_v1.0.0
           +-(my.hidden.feature_v1.0.0)
    +-my.feature.2_v1.0.0
           +-(my.hidden.feature_v1.0.0)

What I am seeing is the following:

I have an existing installation of my product where I have installed
v1.0.0 of my top-level feature (my.uber.feature_v1.0.0).  Now I perform
a new build where every plugin and feature is revisioned up to a new
level, let's say they are now *all* at v1.0.1.  So our installer invokes
the director to install the update like so:

eclipsec.exe -application org.eclipse.equinox.p2.director
-metadataRepository <path_to_repo> -artifactRepository <path_to_repo>
-installIU my.uber.feature.feature.group

This fails, and what I see in the configuration directory is a log file
containing something like this:


!ENTRY org.eclipse.equinox.p2.director 4 1 2009-06-09 09:51:04.283
!MESSAGE Cannot complete the install because of a conflicting
dependency.
!SUBENTRY 1 org.eclipse.equinox.p2.director 4 0 2009-06-09 09:51:04.283
!MESSAGE Software being installed: My Uber Feature 1.0.1.<blah_blah>
(my.uber.feature.feature.group 1.0.1.<blah_blah>)
!SUBENTRY 1 org.eclipse.equinox.p2.director 4 0 2009-06-09 09:51:04.283
!MESSAGE Software currently installed: My Uber Feature 1.0.0.<blah_blah>
(my.uber.feature.feature.group 1.0.0.<blah_blah>)
!SUBENTRY 1 org.eclipse.equinox.p2.director 4 1 2009-06-09 09:51:04.283
!MESSAGE Only one of the following can be installed at once: 
!SUBENTRY 2 org.eclipse.equinox.p2.director 4 0 2009-06-09 09:51:04.283
!MESSAGE My Hidden Feature 1.0.1.<blah_blah>
(my.hidden.feature.feature.jar 1.0.1.<blah_blah>)
!SUBENTRY 2 org.eclipse.equinox.p2.director 4 0 2009-06-09 09:51:04.283
!MESSAGE My Hidden Feature 1.0.0.<blah_blah>
(my.hidden.feature.feature.jar 1.0.0.<blah_blah>)
!SUBENTRY 1 org.eclipse.equinox.p2.director 4 1 2009-06-09 09:51:04.283
!MESSAGE Cannot satisfy dependency:
.
...and lots of unsatisfied dependencies.

Now the feature that shows up after the "Only one of the following can
be installed at once" message seems to vary, probably because all of my
nested features are configured the same.  The metadata for a typical
item that P2 is complaining about is as follows:

    <unit id='my.hidden.feature.feature.jar'
version='1.0.1.<blah_blah>'>
      <properties size='9'>
        <property name='org.eclipse.equinox.p2.name'
value='%featureName'/>
        <property name='org.eclipse.equinox.p2.description'
value='%description'/>
        <property name='org.eclipse.equinox.p2.provider'
value='%providerName'/>
        <property name='org.eclipse.update.feature.plugin'
value='my.hidden.feature'/>
        <property name='df_LT.featureName' value='My Hidden Feature'/>
        <property name='df_LT.copyright' value='Big copyright
message.'/>
        <property name='df_LT.providerName' value='ON Semiconductor'/>
        <property name='df_LT.description' value='My Hidden Feature'/>
        <property name='df_LT.license' value='Big license message.'/>
      </properties>
      <provides size='3'>
        <provided namespace='org.eclipse.equinox.p2.iu'
name='my.hidden.feature.feature.jar' version='1.0.1.<blah_blah>'/>
        <provided namespace='org.eclipse.equinox.p2.eclipse.type'
name='feature' version='1.0.0'/>
        <provided namespace='org.eclipse.update.feature'
name='my.hidden.feature' version='1.0.1.<blah_blah>'/>
      </provides>
      <filter>
        (org.eclipse.update.install.features=true)
      </filter>
      <artifacts size='1'>
        <artifact classifier='org.eclipse.update.feature'
id='my.hidden.feature' version='1.0.1.<blah_blah>'/>
      </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='%25licenseURL' url='%25licenseURL'>
          %license
        </license>
      </licenses>
      <copyright>
        %copyright
      </copyright>
    </unit>


I don't see anything weird here.  Most if not all of my bundles are
singletons, and in any p2.inf files I declare requirements using
"multiple=false" and "greedy=true" and any IUs are declared with
"singleton=true", if that matters.

I guess the first question that comes to mind is, is there a different
command line option to "update" a feature versus "installing" it?  I
kind of assumed they were the same thing and I have not found any other
command line option other than "-installIU".

Please let me know if you need any more information.

Thanks in advance,
Mark.