common/templates/source-spec.ant.xml.ftl
author Simon Howkins <simonh@symbian.org>
Tue, 23 Mar 2010 16:27:27 +0000
changeset 944 eb33247c261d
parent 909 869f7b50a6f1
child 945 0286796100fd
permissions -rw-r--r--
Extended source syncing slightly, to be able to manage use of local tags on (web) server.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
7
389e1e1f1583 Rename and move of generated source sync xml and also tidy up
shaberazvi@LON-ENGBUILD88.prod.ad.symbian.intra
parents:
diff changeset
     1
<?xml version="1.0"?>
17
c677077df18c Fix FMPP template to allow multiple repositories
shaberazvi@LON-ENGBUILD88.prod.ad.symbian.intra
parents: 7
diff changeset
     2
<project name="SF-SOURCESPEC" default="all" xmlns:hlm="http://www.nokia.com/helium">
7
389e1e1f1583 Rename and move of generated source sync xml and also tidy up
shaberazvi@LON-ENGBUILD88.prod.ad.symbian.intra
parents:
diff changeset
     3
897
53bb02c83036 Moved definition of dollar, so it's available for use when needed.
Simon Howkins <simonh@symbian.org>
parents: 896
diff changeset
     4
<#assign dollar = "$"/>
53bb02c83036 Moved definition of dollar, so it's available for use when needed.
Simon Howkins <simonh@symbian.org>
parents: 896
diff changeset
     5
896
e7f07235b184 Stopped cache being located/created in a stupid place, relative to the CWD on the cache drive.
Simon Howkins <simonh@symbian.org>
parents: 893
diff changeset
     6
    <!-- Convert \s in cache location, because otherwise they disappear entirely when used in a regex replacement! -->
e7f07235b184 Stopped cache being located/created in a stupid place, relative to the CWD on the cache drive.
Simon Howkins <simonh@symbian.org>
parents: 893
diff changeset
     7
    <propertyregex property="sf.spec.sourcesync.cachelocation.for.regex" input="${dollar}{sf.spec.sourcesync.cachelocation}" regexp="\\" replace="/" global="true" defaultValue="${dollar}{sf.spec.sourcesync.cachelocation}"/>
944
eb33247c261d Extended source syncing slightly, to be able to manage use of local tags on (web) server.
Simon Howkins <simonh@symbian.org>
parents: 909
diff changeset
     8
eb33247c261d Extended source syncing slightly, to be able to manage use of local tags on (web) server.
Simon Howkins <simonh@symbian.org>
parents: 909
diff changeset
     9
    <!-- Create an empty hg repo to use when converting remote tags into hashes-->
eb33247c261d Extended source syncing slightly, to be able to manage use of local tags on (web) server.
Simon Howkins <simonh@symbian.org>
parents: 909
diff changeset
    10
    <exec executable="hg" dir="${ant['temp.build.dir']}">
eb33247c261d Extended source syncing slightly, to be able to manage use of local tags on (web) server.
Simon Howkins <simonh@symbian.org>
parents: 909
diff changeset
    11
        <arg value="init"/>
eb33247c261d Extended source syncing slightly, to be able to manage use of local tags on (web) server.
Simon Howkins <simonh@symbian.org>
parents: 909
diff changeset
    12
        <arg value="emptyRepo"/>
eb33247c261d Extended source syncing slightly, to be able to manage use of local tags on (web) server.
Simon Howkins <simonh@symbian.org>
parents: 909
diff changeset
    13
    </exec>
eb33247c261d Extended source syncing slightly, to be able to manage use of local tags on (web) server.
Simon Howkins <simonh@symbian.org>
parents: 909
diff changeset
    14
7
389e1e1f1583 Rename and move of generated source sync xml and also tidy up
shaberazvi@LON-ENGBUILD88.prod.ad.symbian.intra
parents:
diff changeset
    15
<#assign fileset = "" />
34
c10840c6fcbb Update Platform Config to build tools2 before tools - which must be run in single thread. Also update sync template to sync in parallel.
shaberazvi@LON-ENGBUILD88.prod.ad.symbian.intra
parents: 17
diff changeset
    16
<#assign sync_list = "" />
68
c86f60d45216 Make BOM identify thread safe
BuildAdmin@LON-ENGBUILD87
parents: 62
diff changeset
    17
<#assign bom_list  = "" />
615
6f70bcc536bb source-spec.ant.xml.ftl - Added change info for the BOM that lists submitted changesets between the baseline ('sf.previous.pdk.tag') and the synced changeset and writes to a changes.txt file in the BOM dir.
MattD <mattd@symbian.org>
parents: 584
diff changeset
    18
<#assign change_list  = "" />
7
389e1e1f1583 Rename and move of generated source sync xml and also tidy up
shaberazvi@LON-ENGBUILD88.prod.ad.symbian.intra
parents:
diff changeset
    19
<#assign count = 0 />
584
920441a385c6 Bug 419 source sync workaround - Added new variable 'sf.spec.sourcesync.bug419' that can be used during source sync that just performs the sync manually without using Maven.
MattD <mattd@symbian.org>
parents: 312
diff changeset
    20
856
0e553fdaa218 Added framework for specifying a "sources.csv" for test repos (separate from both the FBF and the sources repos).
Simon Howkins <simonh@symbian.org>
parents: 799
diff changeset
    21
<#list data as csv_file>
0e553fdaa218 Added framework for specifying a "sources.csv" for test repos (separate from both the FBF and the sources repos).
Simon Howkins <simonh@symbian.org>
parents: 799
diff changeset
    22
  <#list csv_file as pkg_detail>
7
389e1e1f1583 Rename and move of generated source sync xml and also tidy up
shaberazvi@LON-ENGBUILD88.prod.ad.symbian.intra
parents:
diff changeset
    23
    <target name="sf-prebuild-${count}">
892
24ecf67cba71 Bug 1661: Improve build speed with better caching strategy
Simon Howkins <simonh@symbian.org>
parents: 890
diff changeset
    24
        
24ecf67cba71 Bug 1661: Improve build speed with better caching strategy
Simon Howkins <simonh@symbian.org>
parents: 890
diff changeset
    25
        <!-- Create sf\layer dir on build dir -->
24ecf67cba71 Bug 1661: Improve build speed with better caching strategy
Simon Howkins <simonh@symbian.org>
parents: 890
diff changeset
    26
        <mkdir dir="${ant['build.drive']}${pkg_detail.dst}"/>
24ecf67cba71 Bug 1661: Improve build speed with better caching strategy
Simon Howkins <simonh@symbian.org>
parents: 890
diff changeset
    27
        <delete dir="${ant['build.drive']}${pkg_detail.dst}" failonerror="true" />
24ecf67cba71 Bug 1661: Improve build speed with better caching strategy
Simon Howkins <simonh@symbian.org>
parents: 890
diff changeset
    28
        
24ecf67cba71 Bug 1661: Improve build speed with better caching strategy
Simon Howkins <simonh@symbian.org>
parents: 890
diff changeset
    29
        <if>
24ecf67cba71 Bug 1661: Improve build speed with better caching strategy
Simon Howkins <simonh@symbian.org>
parents: 890
diff changeset
    30
            <istrue value="${dollar}{sf.spec.sourcesync.usecache}"/>
24ecf67cba71 Bug 1661: Improve build speed with better caching strategy
Simon Howkins <simonh@symbian.org>
parents: 890
diff changeset
    31
            <then>
24ecf67cba71 Bug 1661: Improve build speed with better caching strategy
Simon Howkins <simonh@symbian.org>
parents: 890
diff changeset
    32
                <!-- Work out cache location from source location -->
896
e7f07235b184 Stopped cache being located/created in a stupid place, relative to the CWD on the cache drive.
Simon Howkins <simonh@symbian.org>
parents: 893
diff changeset
    33
                <propertyregex property="sf.spec.sourcesync.cachelocation.${count}" input="${pkg_detail.source}" regexp="^http://developer.symbian.org/" casesensitive="false" replace="${dollar}{sf.spec.sourcesync.cachelocation.for.regex}/Live/"/>
e7f07235b184 Stopped cache being located/created in a stupid place, relative to the CWD on the cache drive.
Simon Howkins <simonh@symbian.org>
parents: 893
diff changeset
    34
                <propertyregex property="sf.spec.sourcesync.cachelocation.${count}" input="${pkg_detail.source}" regexp="^${ant['sf.spec.sourcesync.local.development.area']}/" casesensitive="false" replace="${dollar}{sf.spec.sourcesync.cachelocation.for.regex}/LocalDev/"/>
892
24ecf67cba71 Bug 1661: Improve build speed with better caching strategy
Simon Howkins <simonh@symbian.org>
parents: 890
diff changeset
    35
            </then>
24ecf67cba71 Bug 1661: Improve build speed with better caching strategy
Simon Howkins <simonh@symbian.org>
parents: 890
diff changeset
    36
        </if>
944
eb33247c261d Extended source syncing slightly, to be able to manage use of local tags on (web) server.
Simon Howkins <simonh@symbian.org>
parents: 909
diff changeset
    37
        
eb33247c261d Extended source syncing slightly, to be able to manage use of local tags on (web) server.
Simon Howkins <simonh@symbian.org>
parents: 909
diff changeset
    38
        <!-- Convert source tag/branch to to changeset hash, in case it's a local tag on the server -->
eb33247c261d Extended source syncing slightly, to be able to manage use of local tags on (web) server.
Simon Howkins <simonh@symbian.org>
parents: 909
diff changeset
    39
        <exec executable="hg" dir="${ant['temp.build.dir']}/emptyRepo" outputproperty="sf.sourcesync.${count}.checksum">
eb33247c261d Extended source syncing slightly, to be able to manage use of local tags on (web) server.
Simon Howkins <simonh@symbian.org>
parents: 909
diff changeset
    40
            <arg value="in"/>
eb33247c261d Extended source syncing slightly, to be able to manage use of local tags on (web) server.
Simon Howkins <simonh@symbian.org>
parents: 909
diff changeset
    41
            <arg value="${pkg_detail.source}"/>
eb33247c261d Extended source syncing slightly, to be able to manage use of local tags on (web) server.
Simon Howkins <simonh@symbian.org>
parents: 909
diff changeset
    42
            <arg value="-r"/>
eb33247c261d Extended source syncing slightly, to be able to manage use of local tags on (web) server.
Simon Howkins <simonh@symbian.org>
parents: 909
diff changeset
    43
            <arg value="${pkg_detail.pattern}"/>
eb33247c261d Extended source syncing slightly, to be able to manage use of local tags on (web) server.
Simon Howkins <simonh@symbian.org>
parents: 909
diff changeset
    44
            <arg value="-l"/>
eb33247c261d Extended source syncing slightly, to be able to manage use of local tags on (web) server.
Simon Howkins <simonh@symbian.org>
parents: 909
diff changeset
    45
            <arg value="1"/>
eb33247c261d Extended source syncing slightly, to be able to manage use of local tags on (web) server.
Simon Howkins <simonh@symbian.org>
parents: 909
diff changeset
    46
            <arg value="--template"/>
eb33247c261d Extended source syncing slightly, to be able to manage use of local tags on (web) server.
Simon Howkins <simonh@symbian.org>
parents: 909
diff changeset
    47
            <arg value="{node|short}"/>
eb33247c261d Extended source syncing slightly, to be able to manage use of local tags on (web) server.
Simon Howkins <simonh@symbian.org>
parents: 909
diff changeset
    48
            <arg value="-q"/>
eb33247c261d Extended source syncing slightly, to be able to manage use of local tags on (web) server.
Simon Howkins <simonh@symbian.org>
parents: 909
diff changeset
    49
        </exec>
eb33247c261d Extended source syncing slightly, to be able to manage use of local tags on (web) server.
Simon Howkins <simonh@symbian.org>
parents: 909
diff changeset
    50
        
892
24ecf67cba71 Bug 1661: Improve build speed with better caching strategy
Simon Howkins <simonh@symbian.org>
parents: 890
diff changeset
    51
        <if>
24ecf67cba71 Bug 1661: Improve build speed with better caching strategy
Simon Howkins <simonh@symbian.org>
parents: 890
diff changeset
    52
            <and>
24ecf67cba71 Bug 1661: Improve build speed with better caching strategy
Simon Howkins <simonh@symbian.org>
parents: 890
diff changeset
    53
                <isset property="sf.spec.sourcesync.cachelocation.${count}"/>
24ecf67cba71 Bug 1661: Improve build speed with better caching strategy
Simon Howkins <simonh@symbian.org>
parents: 890
diff changeset
    54
                <available file="${dollar}{sf.spec.sourcesync.cachelocation.${count}}" type="dir"/>
24ecf67cba71 Bug 1661: Improve build speed with better caching strategy
Simon Howkins <simonh@symbian.org>
parents: 890
diff changeset
    55
            </and>
24ecf67cba71 Bug 1661: Improve build speed with better caching strategy
Simon Howkins <simonh@symbian.org>
parents: 890
diff changeset
    56
            <then>
24ecf67cba71 Bug 1661: Improve build speed with better caching strategy
Simon Howkins <simonh@symbian.org>
parents: 890
diff changeset
    57
                <!-- Package in cache already -->
893
f4d702959f07 Bug 1661: Simplified the sequence of pulls/clones via the cache, so the changes simply go from source -> cache -> destination.
Simon Howkins <simonh@symbian.org>
parents: 892
diff changeset
    58
                <echo message="Pull from ${pkg_detail.source} to ${dollar}{sf.spec.sourcesync.cachelocation.${count}}"/>
898
79766bc6c419 Added error correction, so if a cache repository is corrupted in some way, then it will by-pass it, and try to recover it, or delete it.
Simon Howkins <simonh@symbian.org>
parents: 897
diff changeset
    59
                <exec executable="hg" dir="${dollar}{sf.spec.sourcesync.cachelocation.${count}}" failonerror="false" resultproperty="sf.spec.sourcesync.cache.pull.error.code.${count}">
893
f4d702959f07 Bug 1661: Simplified the sequence of pulls/clones via the cache, so the changes simply go from source -> cache -> destination.
Simon Howkins <simonh@symbian.org>
parents: 892
diff changeset
    60
                    <arg value="pull"/>
f4d702959f07 Bug 1661: Simplified the sequence of pulls/clones via the cache, so the changes simply go from source -> cache -> destination.
Simon Howkins <simonh@symbian.org>
parents: 892
diff changeset
    61
                    <arg value="${pkg_detail.source}"/>
f4d702959f07 Bug 1661: Simplified the sequence of pulls/clones via the cache, so the changes simply go from source -> cache -> destination.
Simon Howkins <simonh@symbian.org>
parents: 892
diff changeset
    62
                </exec>
898
79766bc6c419 Added error correction, so if a cache repository is corrupted in some way, then it will by-pass it, and try to recover it, or delete it.
Simon Howkins <simonh@symbian.org>
parents: 897
diff changeset
    63
                <if>
79766bc6c419 Added error correction, so if a cache repository is corrupted in some way, then it will by-pass it, and try to recover it, or delete it.
Simon Howkins <simonh@symbian.org>
parents: 897
diff changeset
    64
                    <equals arg1="0" arg2="${dollar}{sf.spec.sourcesync.cache.pull.error.code.${count}}"/>
79766bc6c419 Added error correction, so if a cache repository is corrupted in some way, then it will by-pass it, and try to recover it, or delete it.
Simon Howkins <simonh@symbian.org>
parents: 897
diff changeset
    65
                    <then>
79766bc6c419 Added error correction, so if a cache repository is corrupted in some way, then it will by-pass it, and try to recover it, or delete it.
Simon Howkins <simonh@symbian.org>
parents: 897
diff changeset
    66
                        <echo message="Clone from ${dollar}{sf.spec.sourcesync.cachelocation.${count}} to ${ant['build.drive']}${pkg_detail.dst}"/>
79766bc6c419 Added error correction, so if a cache repository is corrupted in some way, then it will by-pass it, and try to recover it, or delete it.
Simon Howkins <simonh@symbian.org>
parents: 897
diff changeset
    67
                        <exec executable="hg" dir="${ant['build.drive']}/" failonerror="true">
79766bc6c419 Added error correction, so if a cache repository is corrupted in some way, then it will by-pass it, and try to recover it, or delete it.
Simon Howkins <simonh@symbian.org>
parents: 897
diff changeset
    68
                            <arg value="clone"/>
79766bc6c419 Added error correction, so if a cache repository is corrupted in some way, then it will by-pass it, and try to recover it, or delete it.
Simon Howkins <simonh@symbian.org>
parents: 897
diff changeset
    69
                            <arg value="-U"/>
79766bc6c419 Added error correction, so if a cache repository is corrupted in some way, then it will by-pass it, and try to recover it, or delete it.
Simon Howkins <simonh@symbian.org>
parents: 897
diff changeset
    70
                            <arg value="--uncompressed"/>
79766bc6c419 Added error correction, so if a cache repository is corrupted in some way, then it will by-pass it, and try to recover it, or delete it.
Simon Howkins <simonh@symbian.org>
parents: 897
diff changeset
    71
                            <arg value="${dollar}{sf.spec.sourcesync.cachelocation.${count}}"/>
79766bc6c419 Added error correction, so if a cache repository is corrupted in some way, then it will by-pass it, and try to recover it, or delete it.
Simon Howkins <simonh@symbian.org>
parents: 897
diff changeset
    72
                            <arg value="${ant['build.drive']}${pkg_detail.dst}"/>
79766bc6c419 Added error correction, so if a cache repository is corrupted in some way, then it will by-pass it, and try to recover it, or delete it.
Simon Howkins <simonh@symbian.org>
parents: 897
diff changeset
    73
                        </exec>
79766bc6c419 Added error correction, so if a cache repository is corrupted in some way, then it will by-pass it, and try to recover it, or delete it.
Simon Howkins <simonh@symbian.org>
parents: 897
diff changeset
    74
                    </then>
79766bc6c419 Added error correction, so if a cache repository is corrupted in some way, then it will by-pass it, and try to recover it, or delete it.
Simon Howkins <simonh@symbian.org>
parents: 897
diff changeset
    75
                    <else>
79766bc6c419 Added error correction, so if a cache repository is corrupted in some way, then it will by-pass it, and try to recover it, or delete it.
Simon Howkins <simonh@symbian.org>
parents: 897
diff changeset
    76
                        <!-- Uh oh - the cache is corrupted somehow -->
79766bc6c419 Added error correction, so if a cache repository is corrupted in some way, then it will by-pass it, and try to recover it, or delete it.
Simon Howkins <simonh@symbian.org>
parents: 897
diff changeset
    77
                        <!-- (Try to) recover the cache repo -->
79766bc6c419 Added error correction, so if a cache repository is corrupted in some way, then it will by-pass it, and try to recover it, or delete it.
Simon Howkins <simonh@symbian.org>
parents: 897
diff changeset
    78
                        <forget>
79766bc6c419 Added error correction, so if a cache repository is corrupted in some way, then it will by-pass it, and try to recover it, or delete it.
Simon Howkins <simonh@symbian.org>
parents: 897
diff changeset
    79
                            <exec executable="hg" dir="${dollar}{sf.spec.sourcesync.cachelocation.${count}}" failonerror="false" resultproperty="sf.spec.sourcesync.cache.recover.error.code.${count}">
79766bc6c419 Added error correction, so if a cache repository is corrupted in some way, then it will by-pass it, and try to recover it, or delete it.
Simon Howkins <simonh@symbian.org>
parents: 897
diff changeset
    80
                                <arg value="recover"/>
79766bc6c419 Added error correction, so if a cache repository is corrupted in some way, then it will by-pass it, and try to recover it, or delete it.
Simon Howkins <simonh@symbian.org>
parents: 897
diff changeset
    81
                            </exec>
79766bc6c419 Added error correction, so if a cache repository is corrupted in some way, then it will by-pass it, and try to recover it, or delete it.
Simon Howkins <simonh@symbian.org>
parents: 897
diff changeset
    82
                            <if>
79766bc6c419 Added error correction, so if a cache repository is corrupted in some way, then it will by-pass it, and try to recover it, or delete it.
Simon Howkins <simonh@symbian.org>
parents: 897
diff changeset
    83
                                <not><equals arg1="0" arg2="${dollar}{sf.spec.sourcesync.cache.recover.error.code.${count}}"/></not>
79766bc6c419 Added error correction, so if a cache repository is corrupted in some way, then it will by-pass it, and try to recover it, or delete it.
Simon Howkins <simonh@symbian.org>
parents: 897
diff changeset
    84
                                <then>
79766bc6c419 Added error correction, so if a cache repository is corrupted in some way, then it will by-pass it, and try to recover it, or delete it.
Simon Howkins <simonh@symbian.org>
parents: 897
diff changeset
    85
                                    <echo message="Trashing ${dollar}{sf.spec.sourcesync.cachelocation.${count}} as broken"/>
79766bc6c419 Added error correction, so if a cache repository is corrupted in some way, then it will by-pass it, and try to recover it, or delete it.
Simon Howkins <simonh@symbian.org>
parents: 897
diff changeset
    86
                                    <delete dir="${dollar}{sf.spec.sourcesync.cachelocation.${count}}"/>
79766bc6c419 Added error correction, so if a cache repository is corrupted in some way, then it will by-pass it, and try to recover it, or delete it.
Simon Howkins <simonh@symbian.org>
parents: 897
diff changeset
    87
                                </then>
79766bc6c419 Added error correction, so if a cache repository is corrupted in some way, then it will by-pass it, and try to recover it, or delete it.
Simon Howkins <simonh@symbian.org>
parents: 897
diff changeset
    88
                            </if>
79766bc6c419 Added error correction, so if a cache repository is corrupted in some way, then it will by-pass it, and try to recover it, or delete it.
Simon Howkins <simonh@symbian.org>
parents: 897
diff changeset
    89
                        </forget>
79766bc6c419 Added error correction, so if a cache repository is corrupted in some way, then it will by-pass it, and try to recover it, or delete it.
Simon Howkins <simonh@symbian.org>
parents: 897
diff changeset
    90
                        <!-- In the meantime, by-pass it for this build -->
79766bc6c419 Added error correction, so if a cache repository is corrupted in some way, then it will by-pass it, and try to recover it, or delete it.
Simon Howkins <simonh@symbian.org>
parents: 897
diff changeset
    91
                        <echo message="Clone from ${pkg_detail.source} to ${ant['build.drive']}${pkg_detail.dst}"/>
79766bc6c419 Added error correction, so if a cache repository is corrupted in some way, then it will by-pass it, and try to recover it, or delete it.
Simon Howkins <simonh@symbian.org>
parents: 897
diff changeset
    92
                        <exec executable="hg" dir="${ant['build.drive']}/" failonerror="true">
79766bc6c419 Added error correction, so if a cache repository is corrupted in some way, then it will by-pass it, and try to recover it, or delete it.
Simon Howkins <simonh@symbian.org>
parents: 897
diff changeset
    93
                            <arg value="clone"/>
79766bc6c419 Added error correction, so if a cache repository is corrupted in some way, then it will by-pass it, and try to recover it, or delete it.
Simon Howkins <simonh@symbian.org>
parents: 897
diff changeset
    94
                            <arg value="-U"/>
79766bc6c419 Added error correction, so if a cache repository is corrupted in some way, then it will by-pass it, and try to recover it, or delete it.
Simon Howkins <simonh@symbian.org>
parents: 897
diff changeset
    95
                            <arg value="${pkg_detail.source}"/>
79766bc6c419 Added error correction, so if a cache repository is corrupted in some way, then it will by-pass it, and try to recover it, or delete it.
Simon Howkins <simonh@symbian.org>
parents: 897
diff changeset
    96
                            <arg value="${ant['build.drive']}${pkg_detail.dst}"/>
79766bc6c419 Added error correction, so if a cache repository is corrupted in some way, then it will by-pass it, and try to recover it, or delete it.
Simon Howkins <simonh@symbian.org>
parents: 897
diff changeset
    97
                        </exec>
79766bc6c419 Added error correction, so if a cache repository is corrupted in some way, then it will by-pass it, and try to recover it, or delete it.
Simon Howkins <simonh@symbian.org>
parents: 897
diff changeset
    98
                    </else>
79766bc6c419 Added error correction, so if a cache repository is corrupted in some way, then it will by-pass it, and try to recover it, or delete it.
Simon Howkins <simonh@symbian.org>
parents: 897
diff changeset
    99
                </if>
892
24ecf67cba71 Bug 1661: Improve build speed with better caching strategy
Simon Howkins <simonh@symbian.org>
parents: 890
diff changeset
   100
                <!-- Update to required revision -->
24ecf67cba71 Bug 1661: Improve build speed with better caching strategy
Simon Howkins <simonh@symbian.org>
parents: 890
diff changeset
   101
                <exec executable="hg" dir="${ant['build.drive']}${pkg_detail.dst}" failonerror="true">
24ecf67cba71 Bug 1661: Improve build speed with better caching strategy
Simon Howkins <simonh@symbian.org>
parents: 890
diff changeset
   102
                    <arg value="update"/>
24ecf67cba71 Bug 1661: Improve build speed with better caching strategy
Simon Howkins <simonh@symbian.org>
parents: 890
diff changeset
   103
                    <arg value="-r"/>
944
eb33247c261d Extended source syncing slightly, to be able to manage use of local tags on (web) server.
Simon Howkins <simonh@symbian.org>
parents: 909
diff changeset
   104
                    <arg value="${dollar}{sf.sourcesync.${count}.checksum}"/>
892
24ecf67cba71 Bug 1661: Improve build speed with better caching strategy
Simon Howkins <simonh@symbian.org>
parents: 890
diff changeset
   105
                </exec>
24ecf67cba71 Bug 1661: Improve build speed with better caching strategy
Simon Howkins <simonh@symbian.org>
parents: 890
diff changeset
   106
            </then>
24ecf67cba71 Bug 1661: Improve build speed with better caching strategy
Simon Howkins <simonh@symbian.org>
parents: 890
diff changeset
   107
            <else>
24ecf67cba71 Bug 1661: Improve build speed with better caching strategy
Simon Howkins <simonh@symbian.org>
parents: 890
diff changeset
   108
                <echo message="Clone from ${pkg_detail.source} to ${ant['build.drive']}${pkg_detail.dst}"/>
24ecf67cba71 Bug 1661: Improve build speed with better caching strategy
Simon Howkins <simonh@symbian.org>
parents: 890
diff changeset
   109
                <exec executable="hg" dir="${ant['build.drive']}/" failonerror="true">
24ecf67cba71 Bug 1661: Improve build speed with better caching strategy
Simon Howkins <simonh@symbian.org>
parents: 890
diff changeset
   110
                    <arg value="clone"/>
24ecf67cba71 Bug 1661: Improve build speed with better caching strategy
Simon Howkins <simonh@symbian.org>
parents: 890
diff changeset
   111
                    <arg value="-U"/>
24ecf67cba71 Bug 1661: Improve build speed with better caching strategy
Simon Howkins <simonh@symbian.org>
parents: 890
diff changeset
   112
                    <arg value="${pkg_detail.source}"/>
24ecf67cba71 Bug 1661: Improve build speed with better caching strategy
Simon Howkins <simonh@symbian.org>
parents: 890
diff changeset
   113
                    <arg value="${ant['build.drive']}${pkg_detail.dst}"/>
24ecf67cba71 Bug 1661: Improve build speed with better caching strategy
Simon Howkins <simonh@symbian.org>
parents: 890
diff changeset
   114
                </exec>
24ecf67cba71 Bug 1661: Improve build speed with better caching strategy
Simon Howkins <simonh@symbian.org>
parents: 890
diff changeset
   115
                <!-- Update to required version -->
24ecf67cba71 Bug 1661: Improve build speed with better caching strategy
Simon Howkins <simonh@symbian.org>
parents: 890
diff changeset
   116
                <exec executable="hg" dir="${ant['build.drive']}${pkg_detail.dst}" failonerror="true">
24ecf67cba71 Bug 1661: Improve build speed with better caching strategy
Simon Howkins <simonh@symbian.org>
parents: 890
diff changeset
   117
                    <arg value="update"/>
24ecf67cba71 Bug 1661: Improve build speed with better caching strategy
Simon Howkins <simonh@symbian.org>
parents: 890
diff changeset
   118
                    <arg value="-r"/>
944
eb33247c261d Extended source syncing slightly, to be able to manage use of local tags on (web) server.
Simon Howkins <simonh@symbian.org>
parents: 909
diff changeset
   119
                    <arg value="${dollar}{sf.sourcesync.${count}.checksum}"/>
892
24ecf67cba71 Bug 1661: Improve build speed with better caching strategy
Simon Howkins <simonh@symbian.org>
parents: 890
diff changeset
   120
                </exec>
24ecf67cba71 Bug 1661: Improve build speed with better caching strategy
Simon Howkins <simonh@symbian.org>
parents: 890
diff changeset
   121
                <if>
24ecf67cba71 Bug 1661: Improve build speed with better caching strategy
Simon Howkins <simonh@symbian.org>
parents: 890
diff changeset
   122
                    <isset property="sf.spec.sourcesync.cachelocation.${count}"/>
24ecf67cba71 Bug 1661: Improve build speed with better caching strategy
Simon Howkins <simonh@symbian.org>
parents: 890
diff changeset
   123
                    <then>
24ecf67cba71 Bug 1661: Improve build speed with better caching strategy
Simon Howkins <simonh@symbian.org>
parents: 890
diff changeset
   124
                        <forget>
24ecf67cba71 Bug 1661: Improve build speed with better caching strategy
Simon Howkins <simonh@symbian.org>
parents: 890
diff changeset
   125
                            <nice newpriority="1"/>
24ecf67cba71 Bug 1661: Improve build speed with better caching strategy
Simon Howkins <simonh@symbian.org>
parents: 890
diff changeset
   126
                            <!-- Init cache -->
24ecf67cba71 Bug 1661: Improve build speed with better caching strategy
Simon Howkins <simonh@symbian.org>
parents: 890
diff changeset
   127
                            <mkdir dir="${dollar}{sf.spec.sourcesync.cachelocation.${count}}"/>
24ecf67cba71 Bug 1661: Improve build speed with better caching strategy
Simon Howkins <simonh@symbian.org>
parents: 890
diff changeset
   128
                            <delete dir="${dollar}{sf.spec.sourcesync.cachelocation.${count}}" failonerror="true" />
24ecf67cba71 Bug 1661: Improve build speed with better caching strategy
Simon Howkins <simonh@symbian.org>
parents: 890
diff changeset
   129
                            <echo message="Initialise cache at ${dollar}{sf.spec.sourcesync.cachelocation.${count}}"/>
24ecf67cba71 Bug 1661: Improve build speed with better caching strategy
Simon Howkins <simonh@symbian.org>
parents: 890
diff changeset
   130
                            <!-- Clone source to get the right default repo -->
24ecf67cba71 Bug 1661: Improve build speed with better caching strategy
Simon Howkins <simonh@symbian.org>
parents: 890
diff changeset
   131
                            <exec executable="hg" dir="${ant['build.drive']}/" failonerror="false">
24ecf67cba71 Bug 1661: Improve build speed with better caching strategy
Simon Howkins <simonh@symbian.org>
parents: 890
diff changeset
   132
                                <arg value="clone"/>
24ecf67cba71 Bug 1661: Improve build speed with better caching strategy
Simon Howkins <simonh@symbian.org>
parents: 890
diff changeset
   133
                                <arg value="-r"/>
24ecf67cba71 Bug 1661: Improve build speed with better caching strategy
Simon Howkins <simonh@symbian.org>
parents: 890
diff changeset
   134
                                <arg value="null"/>
24ecf67cba71 Bug 1661: Improve build speed with better caching strategy
Simon Howkins <simonh@symbian.org>
parents: 890
diff changeset
   135
                                <arg value="${pkg_detail.source}"/>
24ecf67cba71 Bug 1661: Improve build speed with better caching strategy
Simon Howkins <simonh@symbian.org>
parents: 890
diff changeset
   136
                                <arg value="${dollar}{sf.spec.sourcesync.cachelocation.${count}}"/>
24ecf67cba71 Bug 1661: Improve build speed with better caching strategy
Simon Howkins <simonh@symbian.org>
parents: 890
diff changeset
   137
                            </exec>
893
f4d702959f07 Bug 1661: Simplified the sequence of pulls/clones via the cache, so the changes simply go from source -> cache -> destination.
Simon Howkins <simonh@symbian.org>
parents: 892
diff changeset
   138
                            <!-- Set the speed-up flag on the cache repo -->
f4d702959f07 Bug 1661: Simplified the sequence of pulls/clones via the cache, so the changes simply go from source -> cache -> destination.
Simon Howkins <simonh@symbian.org>
parents: 892
diff changeset
   139
                            <echo file="${dollar}{sf.spec.sourcesync.cachelocation.${count}}/.hg/hgrc" append="true" message="${dollar}{line.separator}"/>
f4d702959f07 Bug 1661: Simplified the sequence of pulls/clones via the cache, so the changes simply go from source -> cache -> destination.
Simon Howkins <simonh@symbian.org>
parents: 892
diff changeset
   140
                            <echo file="${dollar}{sf.spec.sourcesync.cachelocation.${count}}/.hg/hgrc" append="true" message="[server]${dollar}{line.separator}"/>
f4d702959f07 Bug 1661: Simplified the sequence of pulls/clones via the cache, so the changes simply go from source -> cache -> destination.
Simon Howkins <simonh@symbian.org>
parents: 892
diff changeset
   141
                            <echo file="${dollar}{sf.spec.sourcesync.cachelocation.${count}}/.hg/hgrc" append="true" message="uncompressed=True${dollar}{line.separator}"/>
892
24ecf67cba71 Bug 1661: Improve build speed with better caching strategy
Simon Howkins <simonh@symbian.org>
parents: 890
diff changeset
   142
                            <echo message="Push from ${ant['build.drive']}${pkg_detail.dst} to ${dollar}{sf.spec.sourcesync.cachelocation.${count}} in background"/>
24ecf67cba71 Bug 1661: Improve build speed with better caching strategy
Simon Howkins <simonh@symbian.org>
parents: 890
diff changeset
   143
                            <exec executable="hg" dir="${ant['build.drive']}${pkg_detail.dst}" failonerror="false">
24ecf67cba71 Bug 1661: Improve build speed with better caching strategy
Simon Howkins <simonh@symbian.org>
parents: 890
diff changeset
   144
                                <arg value="push"/>
24ecf67cba71 Bug 1661: Improve build speed with better caching strategy
Simon Howkins <simonh@symbian.org>
parents: 890
diff changeset
   145
                                <arg value="-f"/>
24ecf67cba71 Bug 1661: Improve build speed with better caching strategy
Simon Howkins <simonh@symbian.org>
parents: 890
diff changeset
   146
                                <arg value="${dollar}{sf.spec.sourcesync.cachelocation.${count}}"/>
24ecf67cba71 Bug 1661: Improve build speed with better caching strategy
Simon Howkins <simonh@symbian.org>
parents: 890
diff changeset
   147
                            </exec>
24ecf67cba71 Bug 1661: Improve build speed with better caching strategy
Simon Howkins <simonh@symbian.org>
parents: 890
diff changeset
   148
                        </forget>
24ecf67cba71 Bug 1661: Improve build speed with better caching strategy
Simon Howkins <simonh@symbian.org>
parents: 890
diff changeset
   149
                    </then>
24ecf67cba71 Bug 1661: Improve build speed with better caching strategy
Simon Howkins <simonh@symbian.org>
parents: 890
diff changeset
   150
                </if>
24ecf67cba71 Bug 1661: Improve build speed with better caching strategy
Simon Howkins <simonh@symbian.org>
parents: 890
diff changeset
   151
            </else>
24ecf67cba71 Bug 1661: Improve build speed with better caching strategy
Simon Howkins <simonh@symbian.org>
parents: 890
diff changeset
   152
        </if>
68
c86f60d45216 Make BOM identify thread safe
BuildAdmin@LON-ENGBUILD87
parents: 62
diff changeset
   153
    </target>
890
41f3579ef67e Indentation and other minor changes to make the file easier to read and understand.
Simon Howkins <simonh@symbian.org>
parents: 856
diff changeset
   154
    
68
c86f60d45216 Make BOM identify thread safe
BuildAdmin@LON-ENGBUILD87
parents: 62
diff changeset
   155
    <target name="sf-bom-info-${count}">
890
41f3579ef67e Indentation and other minor changes to make the file easier to read and understand.
Simon Howkins <simonh@symbian.org>
parents: 856
diff changeset
   156
        <!-- record info on source code repo/rev in BOM file  -->
41f3579ef67e Indentation and other minor changes to make the file easier to read and understand.
Simon Howkins <simonh@symbian.org>
parents: 856
diff changeset
   157
        <echo file="${ant['build.drive']}/output/logs/BOM/sources.csv" append="true" message="${pkg_detail.source},${pkg_detail.dst},changeset,${dollar}{sf.sourcesync.${count}.checksum},${pkg_detail.sysdef}${dollar}{line.separator}"/>
7
389e1e1f1583 Rename and move of generated source sync xml and also tidy up
shaberazvi@LON-ENGBUILD88.prod.ad.symbian.intra
parents:
diff changeset
   158
    </target>
890
41f3579ef67e Indentation and other minor changes to make the file easier to read and understand.
Simon Howkins <simonh@symbian.org>
parents: 856
diff changeset
   159
    
615
6f70bcc536bb source-spec.ant.xml.ftl - Added change info for the BOM that lists submitted changesets between the baseline ('sf.previous.pdk.tag') and the synced changeset and writes to a changes.txt file in the BOM dir.
MattD <mattd@symbian.org>
parents: 584
diff changeset
   160
    <target name="sf-bom-change-info-${count}">
890
41f3579ef67e Indentation and other minor changes to make the file easier to read and understand.
Simon Howkins <simonh@symbian.org>
parents: 856
diff changeset
   161
        <if><not><isset property="sf.sourcesync.${count}.checksum"/></not>
41f3579ef67e Indentation and other minor changes to make the file easier to read and understand.
Simon Howkins <simonh@symbian.org>
parents: 856
diff changeset
   162
            <then>
41f3579ef67e Indentation and other minor changes to make the file easier to read and understand.
Simon Howkins <simonh@symbian.org>
parents: 856
diff changeset
   163
                <exec executable="hg" dir="${ant['build.drive']}${pkg_detail.dst}" outputproperty="sf.sourcesync.${count}.checksum">
41f3579ef67e Indentation and other minor changes to make the file easier to read and understand.
Simon Howkins <simonh@symbian.org>
parents: 856
diff changeset
   164
                    <arg value="identify"/>
41f3579ef67e Indentation and other minor changes to make the file easier to read and understand.
Simon Howkins <simonh@symbian.org>
parents: 856
diff changeset
   165
                    <arg value="-i"/>
41f3579ef67e Indentation and other minor changes to make the file easier to read and understand.
Simon Howkins <simonh@symbian.org>
parents: 856
diff changeset
   166
                </exec>
41f3579ef67e Indentation and other minor changes to make the file easier to read and understand.
Simon Howkins <simonh@symbian.org>
parents: 856
diff changeset
   167
            </then>
41f3579ef67e Indentation and other minor changes to make the file easier to read and understand.
Simon Howkins <simonh@symbian.org>
parents: 856
diff changeset
   168
        </if>
41f3579ef67e Indentation and other minor changes to make the file easier to read and understand.
Simon Howkins <simonh@symbian.org>
parents: 856
diff changeset
   169
        <echo message="Writing BOM changes since ${dollar}{sf.previous.pdk.tag} for ${pkg_detail.dst}" />
41f3579ef67e Indentation and other minor changes to make the file easier to read and understand.
Simon Howkins <simonh@symbian.org>
parents: 856
diff changeset
   170
        <echo file="${ant['build.drive']}/output/logs/BOM/changes.txt" append="true" message="${dollar}{line.separator}${pkg_detail.source}${dollar}{line.separator}${pkg_detail.dst}${dollar}{line.separator}${dollar}{line.separator}" />
892
24ecf67cba71 Bug 1661: Improve build speed with better caching strategy
Simon Howkins <simonh@symbian.org>
parents: 890
diff changeset
   171
            <exec executable="hg" dir="${ant['build.drive']}${pkg_detail.dst}" output="${ant['build.drive']}/output/logs/BOM/changes.txt" append="true">
615
6f70bcc536bb source-spec.ant.xml.ftl - Added change info for the BOM that lists submitted changesets between the baseline ('sf.previous.pdk.tag') and the synced changeset and writes to a changes.txt file in the BOM dir.
MattD <mattd@symbian.org>
parents: 584
diff changeset
   172
                <arg value="log"/>
6f70bcc536bb source-spec.ant.xml.ftl - Added change info for the BOM that lists submitted changesets between the baseline ('sf.previous.pdk.tag') and the synced changeset and writes to a changes.txt file in the BOM dir.
MattD <mattd@symbian.org>
parents: 584
diff changeset
   173
                <arg value="-r"/>
6f70bcc536bb source-spec.ant.xml.ftl - Added change info for the BOM that lists submitted changesets between the baseline ('sf.previous.pdk.tag') and the synced changeset and writes to a changes.txt file in the BOM dir.
MattD <mattd@symbian.org>
parents: 584
diff changeset
   174
                <arg value="${dollar}{sf.sourcesync.${count}.checksum}:${dollar}{sf.previous.pdk.tag}"/>
909
869f7b50a6f1 sourcesync template - Updated generation of 'changes.txt' so that it does a 'follow' rather than being restricted to a 'branch'. This enables us to see the history if the previous tag was an ancestor but on a different branch.
MattD <mattd@symbian.org>
parents: 898
diff changeset
   175
                <arg value="-f"/>
615
6f70bcc536bb source-spec.ant.xml.ftl - Added change info for the BOM that lists submitted changesets between the baseline ('sf.previous.pdk.tag') and the synced changeset and writes to a changes.txt file in the BOM dir.
MattD <mattd@symbian.org>
parents: 584
diff changeset
   176
            </exec>
6f70bcc536bb source-spec.ant.xml.ftl - Added change info for the BOM that lists submitted changesets between the baseline ('sf.previous.pdk.tag') and the synced changeset and writes to a changes.txt file in the BOM dir.
MattD <mattd@symbian.org>
parents: 584
diff changeset
   177
    </target>
890
41f3579ef67e Indentation and other minor changes to make the file easier to read and understand.
Simon Howkins <simonh@symbian.org>
parents: 856
diff changeset
   178
    
799
49167a0e38cf Small changes to make the output file more regular, and therefor easier to read and understand.
Simon Howkins <simonh@symbian.org>
parents: 746
diff changeset
   179
    <#assign fileset = "${fileset}" + "<fileset dir=\"${ant['build.drive']}${pkg_detail.dst}\" includes=\"${pkg_detail.sysdef}\"/>\r\n        " />       
890
41f3579ef67e Indentation and other minor changes to make the file easier to read and understand.
Simon Howkins <simonh@symbian.org>
parents: 856
diff changeset
   180
    <#assign sync_list = "${sync_list}" + "<runtarget target=\"sf-prebuild-${count}\"/>\r\n            "/>
41f3579ef67e Indentation and other minor changes to make the file easier to read and understand.
Simon Howkins <simonh@symbian.org>
parents: 856
diff changeset
   181
    <#assign bom_list = "${bom_list}" + "<runtarget target=\"sf-bom-info-${count}\"/>\r\n        "/>
41f3579ef67e Indentation and other minor changes to make the file easier to read and understand.
Simon Howkins <simonh@symbian.org>
parents: 856
diff changeset
   182
    <#assign change_list = "${change_list}" + "<runtarget target=\"sf-bom-change-info-${count}\"/>\r\n        "/>
17
c677077df18c Fix FMPP template to allow multiple repositories
shaberazvi@LON-ENGBUILD88.prod.ad.symbian.intra
parents: 7
diff changeset
   183
    <#assign count = count + 1 />
856
0e553fdaa218 Added framework for specifying a "sources.csv" for test repos (separate from both the FBF and the sources repos).
Simon Howkins <simonh@symbian.org>
parents: 799
diff changeset
   184
  </#list>
7
389e1e1f1583 Rename and move of generated source sync xml and also tidy up
shaberazvi@LON-ENGBUILD88.prod.ad.symbian.intra
parents:
diff changeset
   185
</#list>
890
41f3579ef67e Indentation and other minor changes to make the file easier to read and understand.
Simon Howkins <simonh@symbian.org>
parents: 856
diff changeset
   186
    
7
389e1e1f1583 Rename and move of generated source sync xml and also tidy up
shaberazvi@LON-ENGBUILD88.prod.ad.symbian.intra
parents:
diff changeset
   187
    <path id="system.definition.files">
389e1e1f1583 Rename and move of generated source sync xml and also tidy up
shaberazvi@LON-ENGBUILD88.prod.ad.symbian.intra
parents:
diff changeset
   188
        <fileset dir="${dollar}{sf.common.config.dir}/sysdefs" includes="*.sysdef.xml"/>
389e1e1f1583 Rename and move of generated source sync xml and also tidy up
shaberazvi@LON-ENGBUILD88.prod.ad.symbian.intra
parents:
diff changeset
   189
        ${fileset}
389e1e1f1583 Rename and move of generated source sync xml and also tidy up
shaberazvi@LON-ENGBUILD88.prod.ad.symbian.intra
parents:
diff changeset
   190
    </path>
890
41f3579ef67e Indentation and other minor changes to make the file easier to read and understand.
Simon Howkins <simonh@symbian.org>
parents: 856
diff changeset
   191
    
41f3579ef67e Indentation and other minor changes to make the file easier to read and understand.
Simon Howkins <simonh@symbian.org>
parents: 856
diff changeset
   192
    <target name="all">
892
24ecf67cba71 Bug 1661: Improve build speed with better caching strategy
Simon Howkins <simonh@symbian.org>
parents: 890
diff changeset
   193
        <parallel threadsPerProcessor="1" failonany="true">
890
41f3579ef67e Indentation and other minor changes to make the file easier to read and understand.
Simon Howkins <simonh@symbian.org>
parents: 856
diff changeset
   194
            ${sync_list}
41f3579ef67e Indentation and other minor changes to make the file easier to read and understand.
Simon Howkins <simonh@symbian.org>
parents: 856
diff changeset
   195
        </parallel>
41f3579ef67e Indentation and other minor changes to make the file easier to read and understand.
Simon Howkins <simonh@symbian.org>
parents: 856
diff changeset
   196
        
41f3579ef67e Indentation and other minor changes to make the file easier to read and understand.
Simon Howkins <simonh@symbian.org>
parents: 856
diff changeset
   197
        <echo message="Adding BOM header"/>
41f3579ef67e Indentation and other minor changes to make the file easier to read and understand.
Simon Howkins <simonh@symbian.org>
parents: 856
diff changeset
   198
        <mkdir dir="${ant['build.drive']}/output/logs/BOM/"/>
41f3579ef67e Indentation and other minor changes to make the file easier to read and understand.
Simon Howkins <simonh@symbian.org>
parents: 856
diff changeset
   199
        <echo file="${ant['build.drive']}/output/logs/BOM/sources.csv" message="source,dst,type,pattern,sysdef${dollar}{line.separator}"/>
41f3579ef67e Indentation and other minor changes to make the file easier to read and understand.
Simon Howkins <simonh@symbian.org>
parents: 856
diff changeset
   200
        
41f3579ef67e Indentation and other minor changes to make the file easier to read and understand.
Simon Howkins <simonh@symbian.org>
parents: 856
diff changeset
   201
        ${bom_list}
41f3579ef67e Indentation and other minor changes to make the file easier to read and understand.
Simon Howkins <simonh@symbian.org>
parents: 856
diff changeset
   202
        
41f3579ef67e Indentation and other minor changes to make the file easier to read and understand.
Simon Howkins <simonh@symbian.org>
parents: 856
diff changeset
   203
        <delete file="${ant['build.drive']}/output/logs/BOM/changes.txt" quiet="true"/>
41f3579ef67e Indentation and other minor changes to make the file easier to read and understand.
Simon Howkins <simonh@symbian.org>
parents: 856
diff changeset
   204
        
41f3579ef67e Indentation and other minor changes to make the file easier to read and understand.
Simon Howkins <simonh@symbian.org>
parents: 856
diff changeset
   205
        ${change_list}
41f3579ef67e Indentation and other minor changes to make the file easier to read and understand.
Simon Howkins <simonh@symbian.org>
parents: 856
diff changeset
   206
    </target>
41f3579ef67e Indentation and other minor changes to make the file easier to read and understand.
Simon Howkins <simonh@symbian.org>
parents: 856
diff changeset
   207
    
615
6f70bcc536bb source-spec.ant.xml.ftl - Added change info for the BOM that lists submitted changesets between the baseline ('sf.previous.pdk.tag') and the synced changeset and writes to a changes.txt file in the BOM dir.
MattD <mattd@symbian.org>
parents: 584
diff changeset
   208
</project>