Fixed the initial population of the epoc32 tree with rnd bins to deal
authorSimon Howkins <simonh@symbian.org>
Thu, 17 Sep 2009 12:11:47 +0100
changeset 461 874d24067366
parent 460 fda39efc6eb8
child 465 8cf07278ef12
Fixed the initial population of the epoc32 tree with rnd bins to deal with the fact that the zips are in a slightly different location. (cf the changes made for Bug 350) Simplified the way in which the setting of sf.spec.package.src.enable is handled - no need to use it to change the zipping template, just use it to control which parts of the template we invoke.
common/build.xml
common/tools/populateziptemplate.pl
--- a/common/build.xml	Thu Sep 17 12:07:34 2009 +0100
+++ b/common/build.xml	Thu Sep 17 12:11:47 2009 +0100
@@ -442,25 +442,12 @@
 
     <target name="sf-preprocess-package-config">
         <mkdir dir="${sf.common.config.dir}/generated"/>
-        <if>
-            <istrue value="${sf.spec.package.src.enable}"/>
-            <then>
-                <echo message="INFO Packaging Source Repos"/>
-                <property name="sf-preprocess-package-config.arg" value=""/>
-            </then>
-            <else>
-                <echo message="INFO Packaging: Ignoring Source Repos"/>
-                <property name="sf-preprocess-package-config.arg" value="--nosource"/>
-            </else>
-        </if>
-
         <exec executable="perl" dir="${build.drive}/" failonerror="false" output="${build.log.dir}/zipconfig.log">
             <arg value="${sf.common.config.dir}/tools/populateziptemplate.pl"/>
             <arg value="${sf.spec.sourcesync.sourcespecdir}/${sf.spec.sourcesync.sourcespecfile}"/>
             <arg value="${sf.common.config.dir}/templates/zip.cfg.xml.ftl.template"/>
             <arg value="${sf.common.config.dir}/generated/zip.cfg.xml.ftl"/>
             <arg value="${build.log.dir}/rnd_excludefile.txt"/>
-            <arg value="${sf-preprocess-package-config.arg}"/>
         </exec>
     </target>
     
@@ -471,11 +458,7 @@
     </target>
     
     <target name="sf-package-source" depends="sf-preprocess-package-config">
-        <!-- Firstly zip up src & rnd by package -->
-        <antcall target="sf-zip-content">
-            <param name="zip.config.file" value="${sf.common.config.dir}/generated/zip.cfg.xml.ftl"/>
-            <param name="zip.target.name" value="src" />
-        </antcall>
+        <!-- Firstly zip up rnd by package -->
         <antcall target="sf-zip-content">
             <param name="zip.config.file" value="${sf.common.config.dir}/generated/zip.cfg.xml.ftl"/>
             <param name="zip.target.name" value="rnd" />
@@ -484,22 +467,40 @@
             <param name="zip.config.file" value="${sf.common.config.dir}/generated/zip.cfg.xml.ftl"/>
             <param name="zip.target.name" value="rnd-internal" />
         </antcall>
-        <!-- Then zip up src zips by layer -->
-        <antcall target="sf-zip-content">
-            <param name="zip.config.file" value="${sf.common.config.dir}/generated/zip.cfg.xml.ftl"/>
-            <param name="zip.target.name" value="src-by-layer" />
-        </antcall>
+        <if>
+            <istrue value="${sf.spec.package.src.enable}"/>
+            <then>
+                <echo message="INFO Packaging Source Repos"/>
+                <antcall target="sf-zip-content">
+                    <param name="zip.config.file" value="${sf.common.config.dir}/generated/zip.cfg.xml.ftl"/>
+                    <param name="zip.target.name" value="src" />
+                </antcall>
+                <!-- Then zip up src zips by layer -->
+                <antcall target="sf-zip-content">
+                    <param name="zip.config.file" value="${sf.common.config.dir}/generated/zip.cfg.xml.ftl"/>
+                    <param name="zip.target.name" value="src-by-layer" />
+                </antcall>
+            </then>
+        </if>
     </target>
     
-    <!-- unpack rnd zips if available -->
+    <!-- Unpack the rnd zips ready to be used in the build -->
     <target name="sf-unpack-rnd">
         <echo message="Unpacking any available RnD binaries"/>
-        <exec executable="7za" dir="${build.drive}" output="${build.log.dir}/unzip_${build.id}_binaries_rnd.log">
-        <arg value="x"/>
-        <arg value="-y"/> <!-- Need to unpack in overwrite mode, due to TEF -->
-        <arg value="${build.drive}/output/zips/bin*.zip"/>
-        </exec>
-    </target>    
-        
+        <for param="rndZip">
+            <fileset dir="${build.drive}/output/zips/">
+                <include name="binaries_*.zip"/> <!-- Internal rnd bins -->
+                <include name="release/bin_*.zip"/> <!-- Releaseable rnd bins -->
+            </fileset>
+            <sequential>
+                <exec executable="7za" dir="${build.drive}" output="${build.log.dir}/unzip_${build.id}_binaries_rnd.log" append="true">
+                    <arg value="x"/>
+                    <arg value="-y"/> <!-- Need to unpack in overwrite mode, due to TEF -->
+                    <arg value="@{rndZip}"/>
+                </exec>
+            </sequential>
+	</for>
+    </target>
+    
 </project>
 
--- a/common/tools/populateziptemplate.pl	Thu Sep 17 12:07:34 2009 +0100
+++ b/common/tools/populateziptemplate.pl	Thu Sep 17 12:11:47 2009 +0100
@@ -26,11 +26,6 @@
 my $template = shift or die "Second arg must be template file";
 my $ftl = shift or die "Third arg must be output file";
 my $rndExcludes = shift or die "Fourth arg must be rnd-excludes file";
-my $nosource = shift;
-if(defined $nosource && $nosource !~ m/--nosource/i)
-{
-  die "fifth argument can only be \'--nosource\'";
-}
 
 # Load CSV
 open my $csvText, "<", $sourcesCSV or die "Unable to open sources.csv from $sourcesCSV";
@@ -79,8 +74,6 @@
 	$package->{dst} =~ s{^/}{}g;
 	if ($package->{source} =~ m{/(sfl|oss)/(MCL|FCL)/sf/([^/]+)/([^/]+)})
 	{
-		if(!defined $nosource)
-  	{
   		push @{$zipConfig->{config}->{config}->{src}->{config}->{$1}->{config}},
   		{
   			set =>
@@ -95,7 +88,6 @@
   				},
   			]
   		};
-  	}	
 	}
 	elsif ($package->{source} =~ m{/rnd/([^/]+)/([^/]+)})
 	{