Skip to content

Add capability and requirement for org.eclipse.equinox.internal.p2.repository.Transport#972

Open
trancexpress wants to merge 1 commit intoeclipse-equinox:masterfrom
trancexpress:gh971
Open

Add capability and requirement for org.eclipse.equinox.internal.p2.repository.Transport#972
trancexpress wants to merge 1 commit intoeclipse-equinox:masterfrom
trancexpress:gh971

Conversation

@trancexpress
Copy link
Contributor

@trancexpress trancexpress commented Nov 14, 2025

Fixes: #971

@trancexpress trancexpress changed the title Add capability and requirement for org.eclipse.equinox.internal.p2.re… Add capability and requirement for org.eclipse.equinox.internal.p2.repository.Transport Nov 14, 2025
@trancexpress
Copy link
Contributor Author

I can run the test fine with the 2 changes here.

@trancexpress
Copy link
Contributor Author

trancexpress commented Nov 14, 2025

Fail on Linux is:

Error:  The projects in the reactor contain a cyclic reference: Edge between 'Vertex{label='org.eclipse.platform:org.eclipse.equinox.p2.transport.ecf:1.4.600-SNAPSHOT'}' and 'Vertex{label='org.eclipse.platform:org.eclipse.equinox.p2.repository:2.9.500-SNAPSHOT'}' introduces to cycle in the graph org.eclipse.platform:org.eclipse.equinox.p2.repository:2.9.500-SNAPSHOT --> org.eclipse.platform:org.eclipse.equinox.p2.transport.ecf:1.4.600-SNAPSHOT --> org.eclipse.platform:org.eclipse.equinox.p2.repository:2.9.500-SNAPSHOT -> [Help 1]

Looks like the transport bundle requires the repository bundle, which needs the service:

Bundle-SymbolicName: org.eclipse.equinox.p2.transport.ecf
[..]
 org.eclipse.equinox.p2.repository;bundle-version="2.1.0",

@github-actions
Copy link

Test Results

0 files   -   384  0 suites   - 384   0s ⏱️ - 41m 16s
0 tests  - 1 907  0 ✅  - 1 904  0 💤  - 3  0 ❌ ±0 
0 runs   - 6 721  0 ✅  - 6 712  0 💤  - 9  0 ❌ ±0 

Results for commit a7b228f. ± Comparison against base commit d20f70b.

@laeubi
Copy link
Member

laeubi commented Nov 14, 2025

@trancexpress I'll need to look into this I think it is a general Tycho problem and we likely want a generic solution for this as we have for p2.inf already!

@laeubi
Copy link
Member

laeubi commented Nov 16, 2025

@trancexpress as the Eclipse is now in RC1 phase and I want to publish a Tycho release soon I would like to postpone this (and the Tycho change) to the next release I assume this is not critical here as one can always manually add the required dependency.

@trancexpress
Copy link
Contributor Author

Sure, no rush here.

org.eclipse.core.jobs;bundle-version="3.5.100"
Service-Component: OSGI-INF/ecfTransport.xml,
OSGI-INF/org.eclipse.equinox.internal.p2.transport.ecf.P2SSLContextFactory.xml
Provide-Capability: osgi.implementation;p2.agent.servicename=org.eclipse.equinox.internal.p2.repository.Transport;version=1.4.600
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This does not look correct, usually the namespace should match the filter see

https://docs.osgi.org/specification/osgi.cmpn/7.0.0/service.namespaces.html#service.namespaces-osgi.implementation.namespace

Also I'm not sure if implementation is a good choice, if we look at how P2 implements this, the osgi service namespace seems a better fit (and we can automate this in the future hopefully to not write these on our own):

https://docs.osgi.org/specification/osgi.cmpn/7.0.0/service.namespaces.html#service.namespaces-osgi.service.namespace

So what we do here is providing an IAgentService with the given property and I would say it must be

osgi.service;objectClass:List<String>="org.eclipse.equinox.p2.core.spi.IAgentServiceFactory";p2.agent.servicename="org.eclipse.equinox.internal.p2.repository.Transport"

@tjwatson can you verify? Sadly the OSGi spec is a bit short on this with examples :-\

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Missing capability and requirement for org.eclipse.equinox.internal.p2.repository.Transport

2 participants