Bug 375780 - Surprising error when ran twice in a row indicating previous not cleaned up
Summary: Surprising error when ran twice in a row indicating previous not cleaned up
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Releng (show other bugs)
Version: 4.2   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: 4.2 M7   Edit
Assignee: David Williams CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 355430
  Show dependency tree
 
Reported: 2012-03-31 12:03 EDT by David Williams CLA
Modified: 2012-04-25 16:00 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description David Williams CLA 2012-03-31 12:03:20 EDT
I think this is just a matter of not cleaning up something from one build to the next ... which I'm sure is due to some of my monkeying around with directory names or something ... but after one successful run, the next time, I quickly get the error below. In fact the files named with "conflicting property" are identical, but I think its flagged as "conflicting" since it is not supposed to be set, yet, and this is part of the "add the license feature during the build" logic. 

I'll studying how "cleaning" is supposed to work ... just making notes as I go. 



= = = =


/opt/public/eclipse/e4/dwtest/eclipse4/build/supportDir/org.eclipse.releng.basebuilder/plugins/org.eclipse.pde.build_3.8.0.v20120119-1950/scripts/genericTargets.xml:191: The following error occurred while executing this line:
/shared/eclipse/e4/dwtest/eclipse4/build/supportDir/src/assemble.master.all.xml:25: The following error occurred while executing this line:
/shared/eclipse/e4/dwtest/eclipse4/build/supportDir/src/assemble.master.all.xml:15: The following error occurred while executing this line:
/shared/eclipse/e4/dwtest/eclipse4/build/supportDir/org.eclipse.releng.eclipsebuilder/eclipse/buildConfigs/master/allElements.xml:31: The following error occurred while executing this line:
/shared/eclipse/e4/dwtest/eclipse4/build/supportDir/src/assemble.master.p2.xml:39: The following error occurred while executing this line:
/shared/eclipse/e4/dwtest/eclipse4/build/supportDir/src/assemble.master.p2.xml:604: The following error occurred while executing this line:
/shared/eclipse/e4/dwtest/eclipse4/build/supportDir/src/assemble.master.p2.xml:25: The following error occurred while executing this line:
/shared/eclipse/e4/dwtest/eclipse4/build/supportDir/src/features/org.eclipse.sdk.examples.source/build.xml:188: Property licenseURL in /shared/eclipse/e4/dwtest/eclipse4/build/supportDir/src/features/org.eclipse.sdk.examples.source/../org.eclipse.license/feature.properties conflicts with property in /shared/eclipse/e4/dwtest/eclipse4/build/supportDir/src/features/org.eclipse.sdk.examples.source/feature.temp.folder/features/org.eclipse.sdk.examples.source_3.5.0.v20110912/feature.properties
Comment 1 David Williams CLA 2012-03-31 13:45:52 EDT
Still not sure how it is _supposed_ to get cleaned up, but to make immediate progress, I added a "forceCompleteClean" at the beginning of buildAll.xml's init method, that will delete the whole ${buildDirectory}. (hopefully it is called just once :/ ) 

This will interfere with doing things like "restarting the build mid-way after it has partially completed", so I don't think this is a good long term fix ... but will try it for now, just to get us building more than once.
Comment 2 David Williams CLA 2012-03-31 14:07:43 EDT
did not help. :( 

It is something else. I'll continue to investigate.
Comment 3 David Williams CLA 2012-04-01 12:35:45 EDT
In the course of things, I also began to completely remove and re-get the basebuilder and the eclipsebuilder since the obviously have some "content" from run to run (see bug 375788). 

Still no help. 

Then ... some old vague memories started to return about deleting filesets ... I had been using 

<delete ....>
  <fileset dir="${buildDirectory}">
    <include name="*"/>
  </fileset>
</delete>

This merely delete the files directly under buildDirectory. 

Sigh. 

Have now changed to 

<delete dir="${buildDirectory}" ... />

As the ant docs say
<quote>
For historical reasons <delete dir="x"/> is different from <delete><fileset dir="x"/></delete>, it will try to remove everything inside "x" including "x" itself, not taking default excludes into account, blindly following all symbolic links. If you need more control, use a nested <fileset>.
</quote>

So, with the first form, we were not getting complete removal ... but ... using <delete dir="${buildDirectory}" ... /> does delete everything under buildDirectory and allows two builds in a row! Yay! 

I'll leave the forced removal and re-get of basebuilder and eclipsebuilder, just to be sure all is "fresh".  Figure "improvements" later. 

eventually, we might want to "fine tune" deletion in buildDirectory, to those parts that need it ... but ... not sure why its not auto-clean each time. One example might be

    <target name="deleteBuilddirectoryExtras">
        <delete includeemptydirs="true" defaultexcludes="false" failonerror="true" verbose="true">
            <fileset dir="${builddirectory}">
                <include name="**/scmCache/**/*" />
            </fileset>
        </delete>
    </target>

So, long story .... but, we can now build more than once :) 

I've opened enhancement bug 375794 to improve this in future ... but complete cleanup seems best way to go for now.