Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [equinox-dev] p2 does not check uses at install time

See https://bugs.eclipse.org/bugs/show_bug.cgi?id=525368
 
Under the covers p2 uses SAT4J to implement a resolver for selecting what to install.  I remember discussing with the original p2 developers the complications of the uses directive such that they could look into encoding the constraint checking necessary for the uses directive into the necessary information for SAT4J to process.  But not much progress was made on that front.  So far p2 usage has been somewhat lucky that this has not posed much of a problem over the years.  It sounds like you may have found a problematic scenario.  I am curious if there is a different choice p2 could have made to get the bundles in your scenario to resolve.

Tom
 
 
 
----- Original message -----
From: Jonah Graham <jonah@xxxxxxxxxxxxxxxx>
Sent by: equinox-dev-bounces@xxxxxxxxxxx
To: Equinox development mailing list <equinox-dev@xxxxxxxxxxx>
Cc:
Subject: [EXTERNAL] [equinox-dev] p2 does not check uses at install time
Date: Wed, Nov 18, 2020 11:18 AM
 
Hello Equinox/p2 folks,
 
Is it a bug that p2 does not check uses constraints at install time?
 
I have a case that I am working on that p2 happily installs bundles, but then they don't resolve.
 
I have hit this while working on Bug 568379 which has uncommitted parts, so I don't have a reproducer yet that is available.
 
The error I get is:
 
org.osgi.framework.BundleException: Could not resolve module: org.eclipse.mylyn.builds.ui [249]
  Unresolved requirement: Require-Bundle: org.eclipse.jdt.debug.ui; resolution:="optional"
  Unresolved requirement: Require-Bundle: org.eclipse.jdt.junit; resolution:="optional"
  Unresolved requirement: Require-Bundle: org.eclipse.jdt.ui; resolution:="optional"
  Unresolved requirement: Require-Bundle: org.eclipse.mylyn.tasks.ui; bundle-version="3.8.0"
    -> Bundle-SymbolicName: org.eclipse.mylyn.tasks.ui; bundle-version="3.25.2.v20200814-0512"; singleton:="true"
       org.eclipse.mylyn.tasks.ui [276]
         Unresolved requirement: Require-Bundle: org.eclipse.mylyn.commons.notifications.feed; bundle-version="1.0.0"
           -> Bundle-SymbolicName: org.eclipse.mylyn.commons.notifications.feed; bundle-version="1.17.2.v20200813-0821"; singleton:="true"
              org.eclipse.mylyn.commons.notifications.feed [254]
                No resolution report for the bundle.  Unresolved requirement: Require-Bundle: org.eclipse.mylyn.team.ui; bundle-version="3.8.0"
    -> Bundle-SymbolicName: org.eclipse.mylyn.team.ui; bundle-version="3.25.2.v20200828-1617"; singleton:="true"
       org.eclipse.mylyn.team.ui [277]
         Unresolved requirement: Require-Bundle: org.eclipse.mylyn.tasks.ui; bundle-version="[3.8.0,4.0.0)"
           -> Bundle-SymbolicName: org.eclipse.mylyn.tasks.ui; bundle-version="3.25.2.v20200814-0512"; singleton:="true"
  Bundle was not resolved because of a uses constraint violation.
  org.apache.felix.resolver.reason.ReasonException: Uses constraint violation. Unable to resolve resource org.eclipse.mylyn.commons.notifications.feed [osgi.identity; osgi.identity="org.eclipse.mylyn.commons.notifications.feed"; type="osgi.bundle"; version:Version="1.17.2.v20200813-0821"; singleton:="true"] because it is exposed to package 'javax.xml.bind' from resources javax.xml.bind [osgi.identity; osgi.identity="javax.xml.bind"; type="osgi.bundle"; version:Version="2.2.0.v201105210648"] and jakarta.xml.bind [osgi.identity; type="osgi.bundle"; version:Version="2.3.3.v20201118-1629"; osgi.identity="jakarta.xml.bind"] via two dependency chains.

Chain 1:
  org.eclipse.mylyn.commons.notifications.feed [osgi.identity; osgi.identity="org.eclipse.mylyn.commons.notifications.feed"; type="osgi.bundle"; version:Version="1.17.2.v20200813-0821"; singleton:="true"]
    require: (&(osgi.wiring.bundle=javax.xml.bind)(bundle-version>=2.2.0))
     |
    provide: osgi.wiring.bundle: javax.xml.bind
  javax.xml.bind [osgi.identity; osgi.identity="javax.xml.bind"; type="osgi.bundle"; version:Version="2.2.0.v201105210648"]

Chain 2:
  org.eclipse.mylyn.commons.notifications.feed [osgi.identity; osgi.identity="org.eclipse.mylyn.commons.notifications.feed"; type="osgi.bundle"; version:Version="1.17.2.v20200813-0821"; singleton:="true"]
    require: (&(osgi.wiring.bundle=com.sun.xml.bind)(bundle-version>=2.2.0))
     |
    provide: osgi.wiring.bundle; bundle-version:Version="2.3.3.v20201118-1639"; osgi.wiring.bundle="com.sun.xml.bind"
  com.sun.xml.bind [osgi.identity; type="osgi.bundle"; version:Version="2.3.3.v20201118-1639"; osgi.identity="com.sun.xml.bind"]
    import: (&(osgi.wiring.package=javax.xml.bind)(&(version>=2.3.3)(!(version>=2.3.4))))
     |
    export: osgi.wiring.package: javax.xml.bind
  jakarta.xml.bind [osgi.identity; type="osgi.bundle"; version:Version="2.3.3.v20201118-1629"; osgi.identity="jakarta.xml.bind"]
at org.eclipse.osgi.container.Module.start(Module.java:463)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel$2.run(ModuleContainer.java:1845)
at org.eclipse.osgi.internal.framework.EquinoxContainerAdaptor$1$1.execute(EquinoxContainerAdaptor.java:136)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1838)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1779)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1743)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1665)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1)
at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:234)
at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:345)
 
Thanks
Jonah
 
~~~
Jonah Graham
Kichwa Coders
www.kichwacoders.com
_______________________________________________
equinox-dev mailing list
equinox-dev@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/equinox-dev
 


Back to the top