|
Re: An error occurred while collecting items to be installed in headless p2 update example [message #480293 is a reply to message #480125] |
Fri, 14 August 2009 18:56 |
Michael Yara Messages: 27 Registered: July 2009 |
Junior Member |
|
|
Ok I think i figured this one out. It looks like if you pass a progress
monitor to the plan executor it fails in the described fashion but if
you set the monitor to null it works just fine.
Dosen't Work:
IStatus status = engine.perform(profile, new DefaultPhaseSet(),
plan.getOperands(), pc, sub.newChild(100, SubMonitor.SUPPRESS_ALL_LABELS));
Works:
IStatus status = engine.perform(profile, new DefaultPhaseSet(),
plan.getOperands(), pc, null);
No to figure out why it is causing the problem.
Michael Yara wrote:
> Hello,
>
> I am trying to get the headless p2 update example to run on a local
> repository. I have pulled the code from the MailRCP example found here.
>
> http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.equinox /p2/examples/org.eclipse.equinox.p2.examples.rcp.prestartupd ate/?root=RT_Project
>
>
> I have modified P2Util to change the URI repository locations that are
> searched. I have replaced:
>
> final URI[] reposToSearch =
> manager.getKnownRepositories(IRepositoryManager.REPOSITORIES _ALL);
>
> with
>
> URI[] tempReposToSearch = null;
> try {
> tempReposToSearch = new URI[] {(new
> URI("file:///C:/Documents%20and%20Settings/Mike/Desktop/test/"))};
> } catch (Exception e) {
> System.err.println("Exception");
> }
>
> final URI[] reposToSearch = tempReposToSearch;
>
>
> when the update runs with the above modification on my repo the line
>
> IStatus status = engine.perform(profile,
> new DefaultPhaseSet(),
> plan.getOperands(),
> pc, sub.newChild(100,
> SubMonitor.SUPPRESS_ALL_LABELS));
>
>
> returns an Error status with a message of "An error occurred while
> collecting items to be installed", an error code of "4" and no exception.
>
> I have even tried
>
> final URI[] reposToSearch = new URI[] {(new File("C:\\Documents and
> Settings\\Mike\\Desktop\\test\\").toURI())};
>
> with no luck. Can someone please help.
>
> Thanks,
> Mike
|
|
|
|
Powered by
FUDForum. Page generated in 0.03437 seconds