Releng: use boot OT/J compiler to create new compiler for phase 2

- try simulating update by revert then install
diff --git a/releng/build-scripts/build/p2helper.xml b/releng/build-scripts/build/p2helper.xml
index 4f09e00..0f6512e 100644
--- a/releng/build-scripts/build/p2helper.xml
+++ b/releng/build-scripts/build/p2helper.xml
@@ -70,12 +70,45 @@
         </java>
     </target>
 
+    <target name="tagState">
+        <echo message="Tagging installation state as ${tagName}"/>
+        <java
+                inputstring=""
+                dir="${targetEclipseDir}"
+                fork="true"
+                classname="org.eclipse.equinox.launcher.Main"
+                classpath="${targetEclipseDir}/plugins/${org.eclipse.equinox.launcher_jar}">
+            <jvmarg value="-Declipse.p2.MD5Check=false" />
+            <arg value="-consoleLog"/>
+            <arg value="-application"/>
+            <arg value="org.eclipse.equinox.p2.director"/>
+            <arg value="-tag" />
+            <arg value="${tagName}" />
+        </java>
+    </target>
+
+    <target name="revert">
+        <echo message="Reverting installation to tag ${tagName}"/>
+        <java
+                inputstring=""
+                dir="${targetEclipseDir}"
+                fork="true"
+                classname="org.eclipse.equinox.launcher.Main"
+                classpath="${targetEclipseDir}/plugins/${org.eclipse.equinox.launcher_jar}">
+            <jvmarg value="-Declipse.p2.MD5Check=false" />
+            <arg value="-consoleLog"/>
+            <arg value="-application"/>
+            <arg value="org.eclipse.equinox.p2.director"/>
+            <arg value="-revert" />
+            <arg value="${tagName}" />
+        </java>
+    </target>
+
     <target name="installOTDT">
     	<echo message="Installing the OTDT from ${otdtUpdatesDir} into ${test.eclipseDir}"/>
-        <antcall target="installFeature">
-        	<!-- update -->
-            <param name="feature" value="org.eclipse.objectteams.otdt.core.patch.feature.group"/>
-            <param name="sourceUpdatesDir" value="${otdtUpdatesDir}"/>
+        <antcall target="revert">
+        	<!-- to simulate update -->
+            <param name="tagName" value="beforePatch"/>
             <param name="targetEclipseDir" value="${test.eclipseDir}"/>
         </antcall>
         <antcall target="installFeature">
diff --git a/releng/build-scripts/build/run.xml b/releng/build-scripts/build/run.xml
index 9112a94..e9b2f72 100644
--- a/releng/build-scripts/build/run.xml
+++ b/releng/build-scripts/build/run.xml
@@ -285,6 +285,10 @@
 	            <jvmarg value="${vm.args}"/>
         </java>
 		<!-- Now we should have an update site with the patch feature, time to install it into base: -->
+        <ant antfile="${OTScriptDir}/p2helper.xml" target="tagState" dir="${baseLocation}">
+            <property name="tagName" value="beforePatch"/>
+            <property name="targetEclipseDir" value="${baseLocation}"/>
+        </ant>
         <ant antfile="${OTScriptDir}/p2helper.xml" target="installFeature" dir="${baseLocation}">
             <property name="feature" value="org.eclipse.objectteams.otdt.core.patch.feature.group"/>
             <property name="sourceUpdatesDir" value="${otdtUpdatesDir}"/>