Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 323626

Summary: [publisher][regression] Cannot provide -contextMetadata to publisher application
Product: [Eclipse Project] Equinox Reporter: Ian Bull <irbull>
Component: p2Assignee: P2 Inbox <equinox.p2-inbox>
Status: CLOSED FIXED QA Contact:
Severity: major    
Priority: P3 CC: dj.houghton, hmalphettes, igor, irbull, jan.von.loewenstein, matthias.gradl, pascal, t-oberlies
Version: unspecified   
Target Milestone: 3.7 M3   
Hardware: PC   
OS: Windows Vista   
Whiteboard:
Bug Depends on: 315757    
Bug Blocks:    

Description Ian Bull CLA 2010-08-25 11:31:55 EDT
+++ This bug was initially created as a clone of Bug #315757 +++

Build Identifier: Target against Helios update site

When the org.eclipse.equinox.p2.publisher.AbstractPublisherApplication processes the command line parameter -contextMetadata it uses the member "agent". However this member is still null at that point in time. Consequently the context metadata repository of the PublisherInfo is set to null (meaning no context repository).
Effectively the parameter -contextMetadata is ignored.


Reproducible: Always

Steps to Reproduce:
The parameter "-contextMetadata" is interpreted here:
at org.eclipse.equinox.p2.publisher.AbstractPublisherApplication.processMetadataRepositoryList(AbstractPublisherApplication.java:213)
at org.eclipse.equinox.p2.publisher.AbstractPublisherApplication.processParameter(AbstractPublisherApplication.java:183)
at org.eclipse.equinox.p2.publisher.AbstractPublisherApplication.processCommandLineArguments(AbstractPublisherApplication.java:149)
at org.eclipse.equinox.p2.publisher.AbstractPublisherApplication.run(AbstractPublisherApplication.java:270)
at org.eclipse.equinox.p2.publisher.AbstractPublisherApplication.start(AbstractPublisherApplication.java:323)

... but the member "agent" is only initialized afterwards:
at org.eclipse.equinox.p2.publisher.AbstractPublisherApplication.setupAgent(AbstractPublisherApplication.java:252)
at org.eclipse.equinox.p2.publisher.AbstractPublisherApplication.run(AbstractPublisherApplication.java:292)
at org.eclipse.equinox.p2.publisher.AbstractPublisherApplication.run(AbstractPublisherApplication.java:271)
at org.eclipse.equinox.p2.publisher.AbstractPublisherApplication.start(AbstractPublisherApplication.java:323)
Comment 1 Ian Bull CLA 2010-08-25 11:33:31 EDT
I've fixed this in head.  The commit comment actually says bug 315757. Sorry about that.
Comment 2 DJ Houghton CLA 2010-09-16 12:06:26 EDT
There was a problem with tagging HEAD so this fix won't appear in integration builds until the first build after 3.7 M2.