Community
Participate
Working Groups
Tom and I both have had the same problem where we update the SDK (or install a new bundle group... for me it was PDT) and the install appears to complete but there is no indication and no prompt for restart. On further investigation, this stack is in the log file. java.io.IOException: The element type "repository" must be terminated by the matching end-tag "</repository>". at org.eclipse.equinox.internal.p2.metadata.repository.MetadataRepositoryIO$Parser.parse(MetadataRepositoryIO.java:217) at org.eclipse.equinox.internal.p2.metadata.repository.MetadataRepositoryIO.read(MetadataRepositoryIO.java:65) at org.eclipse.equinox.internal.p2.metadata.repository.SimpleMetadataRepositoryFactory.load(SimpleMetadataRepositoryFactory.java:107) at org.eclipse.equinox.internal.p2.metadata.repository.MetadataRepositoryManager.factoryLoad(MetadataRepositoryManager.java:57) at org.eclipse.equinox.internal.p2.repository.helpers.AbstractRepositoryManager.loadRepository(AbstractRepositoryManager.java:745) at org.eclipse.equinox.internal.p2.repository.helpers.AbstractRepositoryManager.loadRepository(AbstractRepositoryManager.java:650) at org.eclipse.equinox.internal.p2.metadata.repository.MetadataRepositoryManager.loadRepository(MetadataRepositoryManager.java:96) at org.eclipse.equinox.internal.p2.metadata.repository.MetadataRepositoryManager.loadRepository(MetadataRepositoryManager.java:92) at org.eclipse.equinox.internal.p2.metadata.repository.CompositeMetadataRepository.addChild(CompositeMetadataRepository.java:153) at org.eclipse.equinox.internal.p2.metadata.repository.CompositeMetadataRepository.<init>(CompositeMetadataRepository.java:106) at org.eclipse.equinox.internal.p2.metadata.repository.CompositeMetadataRepositoryFactory.load(CompositeMetadataRepositoryFactory.java:122) at org.eclipse.equinox.internal.p2.metadata.repository.MetadataRepositoryManager.factoryLoad(MetadataRepositoryManager.java:57) at org.eclipse.equinox.internal.p2.repository.helpers.AbstractRepositoryManager.loadRepository(AbstractRepositoryManager.java:745) at org.eclipse.equinox.internal.p2.repository.helpers.AbstractRepositoryManager.loadRepository(AbstractRepositoryManager.java:650) at org.eclipse.equinox.internal.p2.metadata.repository.MetadataRepositoryManager.loadRepository(MetadataRepositoryManager.java:96) at org.eclipse.equinox.internal.p2.metadata.repository.MetadataRepositoryManager.loadRepository(MetadataRepositoryManager.java:92) at org.eclipse.equinox.p2.ui.LoadMetadataRepositoryJob.doLoad(LoadMetadataRepositoryJob.java:115) at org.eclipse.equinox.p2.ui.LoadMetadataRepositoryJob.runModal(LoadMetadataRepositoryJob.java:100) at org.eclipse.equinox.internal.p2.ui.sdk.PreloadingRepositoryHandler$2.runModal(PreloadingRepositoryHandler.java:82) at org.eclipse.equinox.p2.operations.ProvisioningJob.run(ProvisioningJob.java:177) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
The stack trace seems unrelated. We are trying to add a child to a composite repository and the child is malformed so we log an error and continue. I just upgraded from one build to another and didn't get a prompt. (or stack)
I'll take a look at this. We'll need to modify ProfileModificationJob to handle the case where a profileid of _SELF_ is handled correctly.
Susan, what are your thoughts here? Currently the method looks like this: public int getRestartPolicy() { IProfile profile = getSession().getProfileRegistry().getProfile(IProfileRegistry.SELF); String id = profile == null ? null : profile.getProfileId(); if (id != null && profileId.equals(id)) return restartPolicy; return ProvisioningJob.RESTART_NONE; } And I'm wondering if it is enough to do this: public int getRestartPolicy() { if (profileId.equals(IProfileRegistry.SELF)) return restartPolicy; return ProvisioningJob.RESTART_NONE; } I guess the question is: Is there a case where the profileid of the job isn't _SELF_ and we are updating ourselves? Could it be the actual id of the profile? With the registry lookup code, I'm slightly worried about the case where we are using a build (with a _SELF_ profile id of SDKProfile) to update a different install (with the same profile id). I believe in that case we would be prompted to restart because our profile ids matched.
Created attachment 180520 [details] Fix v01
Susan, this is a fairly major bug so we are just going to release a fix for the next I-build. Would still appreciate a quick look at the patch when you get a chance, just to make sure we understood the intent of the change you made here.
With the patch I am now prompted between updates. Patch released to HEAD. Closing.