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

Bug 354321

Summary: CLEAN_BUILD cleans too much in headless build
Product: [Technology] CBI Reporter: David Williams <david_williams>
Component: CBI p2 Repository AggregatorAssignee: Project Inbox <b3.aggregator-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: major    
Priority: P3 CC: thomas
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard:

Description David Williams CLA 2011-08-10 00:51:31 EDT
... or, perhaps, more accurate to say cleans at wrong time? Or, something. 

I've tried setting up Juno aggregation, using the .2 version of aggregator, on Eclipse 3.7. 

The build is not on "eclipse.org" yet, but I'm trying to get the headless build working on a test machine. And ran into a problem. It would fail, right away, with exception below ... Illegal State, since p2 directory didn't exist. 

Knowing how these things go, I changed to use --action BUILD instead of CLEAN_BUILD. An then it worked! (at least, once, at least so far ... has gotten to "mirroring" phase). 

So ... my guess is ... the "clean build" option was not well tested ... and, it cleans alright ... but, some other part of the code doesn't know that ... or, has already created the "p2 directory"? 

I would mark this as "blocker", but, I guess, we could say there is a work around ... and I could just change the scripts to "clean" the 'aggregation' directory before the build starts, and then just simply use the "BUILD" action. But, at least a major lose of function. And confidence. Be sure to say soon if you'd recommend moving back to the 1.x version, at least for M1. 

= = = = = 

!ENTRY org.eclipse.b3.util 4 -364274674 2011-08-10 00:50:10.229
!MESSAGE Build failed! Exception was java.lang.IllegalStateException: Registry Directory not available: /home/shared/juno/aggregation/p2/org.eclipse.equinox.p2.engine/profileRegistry.
!STACK 0
java.lang.IllegalStateException: Registry Directory not available: /home/shared/juno/aggregation/p2/org.eclipse.equinox.p2.engine/profileRegistry.
        at org.eclipse.equinox.internal.p2.engine.SimpleProfileRegistry.restore(SimpleProfileRegistry.java:419)
        at org.eclipse.equinox.internal.p2.engine.SimpleProfileRegistry.getProfileMap(SimpleProfileRegistry.java:277)
        at org.eclipse.equinox.internal.p2.engine.SimpleProfileRegistry.getProfiles(SimpleProfileRegistry.java:259)
        at org.eclipse.b3.aggregator.engine.Builder.run(Builder.java:1608)
        at org.eclipse.b3.aggregator.engine.Builder.run(Builder.java:1683)
        at org.eclipse.b3.cli.AbstractCommand.run(AbstractCommand.java:133)
        at org.eclipse.b3.cli.Headless.run(Headless.java:161)
        at org.eclipse.b3.cli.Headless.start(Headless.java:197)
        at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
        at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
        at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
        at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:344)
        at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:48)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:600)
        at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:622)
        at org.eclipse.equinox.launcher.Main.basicRun(Main.java:577)
        at org.eclipse.equinox.launcher.Main.run(Main.java:1410)
Comment 1 Thomas Hallgren CLA 2011-08-16 03:06:45 EDT
Fixed in revision 1549.
Comment 2 David Williams CLA 2016-09-16 15:58:16 EDT
[Bookkeeping change only. Moving bugs to the new "home" of aggregator, CBI.
No change to assignee for resolved and verified bugs.]