common/templates/source-spec.ant.xml.ftl
author Simon Howkins <simonh@symbian.org>
Tue, 21 Sep 2010 13:09:28 +0100
changeset 1264 cdda4a9d1d16
parent 1206 4518bca1baf0
permissions -rw-r--r--
Store error output from 'hg id' to help diagnose why it's failing at the moment.
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
977
293f16b1c667 Retry "module" for ant scripts, initially used by source syncing operations.
Simon Howkins <simonh@symbian.org>
parents: 952
diff changeset
     6
    <import file="${dollar}{sf.common.config.dir}/build.retry.xml"/>
293f16b1c667 Retry "module" for ant scripts, initially used by source syncing operations.
Simon Howkins <simonh@symbian.org>
parents: 952
diff changeset
     7
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
     8
    <!-- 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
     9
    <propertyregex property="sf.spec.sourcesync.cachelocation.for.regex" input="${dollar}{sf.spec.sourcesync.cachelocation}" regexp="\\" replace="/" global="true" defaultValue="${dollar}{sf.spec.sourcesync.cachelocation}"/>
952
ea541face66b Re-apply changes to allow sources.csv to specify a revision by a *local* tag in the web repository.
Simon Howkins <simonh@symbian.org>
parents: 949
diff changeset
    10
7
389e1e1f1583 Rename and move of generated source sync xml and also tidy up
shaberazvi@LON-ENGBUILD88.prod.ad.symbian.intra
parents:
diff changeset
    11
<#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
    12
<#assign sync_list = "" />
68
c86f60d45216 Make BOM identify thread safe
BuildAdmin@LON-ENGBUILD87
parents: 62
diff changeset
    13
<#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
    14
<#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
    15
<#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
    16
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
    17
<#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
    18
  <#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
    19
    <target name="sf-prebuild-${count}">
1206
4518bca1baf0 Improved diagnostic output: when the build fails because a package cannot be cloned into the build drive, it says which package and the repo source and destination.
Simon Howkins <simonh@symbian.org>
parents: 1173
diff changeset
    20
        
4518bca1baf0 Improved diagnostic output: when the build fails because a package cannot be cloned into the build drive, it says which package and the repo source and destination.
Simon Howkins <simonh@symbian.org>
parents: 1173
diff changeset
    21
        <!-- if defined the revision override take that as revision and change the url to point to FCL -->
4518bca1baf0 Improved diagnostic output: when the build fails because a package cannot be cloned into the build drive, it says which package and the repo source and destination.
Simon Howkins <simonh@symbian.org>
parents: 1173
diff changeset
    22
        <if>
4518bca1baf0 Improved diagnostic output: when the build fails because a package cannot be cloned into the build drive, it says which package and the repo source and destination.
Simon Howkins <simonh@symbian.org>
parents: 1173
diff changeset
    23
            <not><equals arg1="${ant['sf.spec.sources.revision']}" arg2="" trim="true"/></not>
4518bca1baf0 Improved diagnostic output: when the build fails because a package cannot be cloned into the build drive, it says which package and the repo source and destination.
Simon Howkins <simonh@symbian.org>
parents: 1173
diff changeset
    24
            <then>
4518bca1baf0 Improved diagnostic output: when the build fails because a package cannot be cloned into the build drive, it says which package and the repo source and destination.
Simon Howkins <simonh@symbian.org>
parents: 1173
diff changeset
    25
                <property name="sources.${count}.revision" value="${ant['sf.spec.sources.revision']}"/>
4518bca1baf0 Improved diagnostic output: when the build fails because a package cannot be cloned into the build drive, it says which package and the repo source and destination.
Simon Howkins <simonh@symbian.org>
parents: 1173
diff changeset
    26
                <propertyregex property="sources.${count}.URL" input="${pkg_detail.source}" regexp="/MCL/" casesensitive="false" replace="/FCL/" defaultValue="${pkg_detail.source}"/>
4518bca1baf0 Improved diagnostic output: when the build fails because a package cannot be cloned into the build drive, it says which package and the repo source and destination.
Simon Howkins <simonh@symbian.org>
parents: 1173
diff changeset
    27
            </then>
4518bca1baf0 Improved diagnostic output: when the build fails because a package cannot be cloned into the build drive, it says which package and the repo source and destination.
Simon Howkins <simonh@symbian.org>
parents: 1173
diff changeset
    28
            <else>
4518bca1baf0 Improved diagnostic output: when the build fails because a package cannot be cloned into the build drive, it says which package and the repo source and destination.
Simon Howkins <simonh@symbian.org>
parents: 1173
diff changeset
    29
                <property name="sources.${count}.revision" value="${pkg_detail.pattern}"/>
4518bca1baf0 Improved diagnostic output: when the build fails because a package cannot be cloned into the build drive, it says which package and the repo source and destination.
Simon Howkins <simonh@symbian.org>
parents: 1173
diff changeset
    30
                <property name="sources.${count}.URL" value="${pkg_detail.source}"/>
4518bca1baf0 Improved diagnostic output: when the build fails because a package cannot be cloned into the build drive, it says which package and the repo source and destination.
Simon Howkins <simonh@symbian.org>
parents: 1173
diff changeset
    31
            </else>
4518bca1baf0 Improved diagnostic output: when the build fails because a package cannot be cloned into the build drive, it says which package and the repo source and destination.
Simon Howkins <simonh@symbian.org>
parents: 1173
diff changeset
    32
        </if>
892
24ecf67cba71 Bug 1661: Improve build speed with better caching strategy
Simon Howkins <simonh@symbian.org>
parents: 890
diff changeset
    33
        
24ecf67cba71 Bug 1661: Improve build speed with better caching strategy
Simon Howkins <simonh@symbian.org>
parents: 890
diff changeset
    34
        <!-- 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
    35
        <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
    36
        <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
    37
        
24ecf67cba71 Bug 1661: Improve build speed with better caching strategy
Simon Howkins <simonh@symbian.org>
parents: 890
diff changeset
    38
        <if>
24ecf67cba71 Bug 1661: Improve build speed with better caching strategy
Simon Howkins <simonh@symbian.org>
parents: 890
diff changeset
    39
            <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
    40
            <then>
24ecf67cba71 Bug 1661: Improve build speed with better caching strategy
Simon Howkins <simonh@symbian.org>
parents: 890
diff changeset
    41
                <!-- Work out cache location from source location -->
1042
f505fa5486eb Add new property sf.spec.sources.revision to override revisions of source repos
Dario Sestito <darios@symbian.org>
parents: 977
diff changeset
    42
                <propertyregex property="sf.spec.sourcesync.cachelocation.${count}" input="${dollar}{sources.${count}.URL}" regexp="^http://developer.symbian.org/" casesensitive="false" replace="${dollar}{sf.spec.sourcesync.cachelocation.for.regex}/Live/"/>
f505fa5486eb Add new property sf.spec.sources.revision to override revisions of source repos
Dario Sestito <darios@symbian.org>
parents: 977
diff changeset
    43
                <propertyregex property="sf.spec.sourcesync.cachelocation.${count}" input="${dollar}{sources.${count}.URL}" 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
    44
            </then>
24ecf67cba71 Bug 1661: Improve build speed with better caching strategy
Simon Howkins <simonh@symbian.org>
parents: 890
diff changeset
    45
        </if>
952
ea541face66b Re-apply changes to allow sources.csv to specify a revision by a *local* tag in the web repository.
Simon Howkins <simonh@symbian.org>
parents: 949
diff changeset
    46
        
ea541face66b Re-apply changes to allow sources.csv to specify a revision by a *local* tag in the web repository.
Simon Howkins <simonh@symbian.org>
parents: 949
diff changeset
    47
        <!-- Convert source tag/branch to to changeset hash, in case it's a local tag on the server -->
1206
4518bca1baf0 Improved diagnostic output: when the build fails because a package cannot be cloned into the build drive, it says which package and the repo source and destination.
Simon Howkins <simonh@symbian.org>
parents: 1173
diff changeset
    48
        <retry tries="10" uniquename="${count}" failonerror="false">
977
293f16b1c667 Retry "module" for ant scripts, initially used by source syncing operations.
Simon Howkins <simonh@symbian.org>
parents: 952
diff changeset
    49
            <sequential>
1264
cdda4a9d1d16 Store error output from 'hg id' to help diagnose why it's failing at the moment.
Simon Howkins <simonh@symbian.org>
parents: 1206
diff changeset
    50
                <exec executable="hg" failonerror="true" output="${ant['temp.build.dir']}/sf.sourcesync.${count}.checksum" error="${ant['temp.build.dir']}/sf.sourcesync.${count}.checksum.error.txt">
977
293f16b1c667 Retry "module" for ant scripts, initially used by source syncing operations.
Simon Howkins <simonh@symbian.org>
parents: 952
diff changeset
    51
                    <arg value="id"/>
1042
f505fa5486eb Add new property sf.spec.sources.revision to override revisions of source repos
Dario Sestito <darios@symbian.org>
parents: 977
diff changeset
    52
                    <arg value="${dollar}{sources.${count}.URL}"/>
977
293f16b1c667 Retry "module" for ant scripts, initially used by source syncing operations.
Simon Howkins <simonh@symbian.org>
parents: 952
diff changeset
    53
                    <arg value="-r"/>
1043
2c948b30191c Fix: when sf.spec.sources.revision is defined sources are not updated to it
Dario Sestito <darios@symbian.org>
parents: 1042
diff changeset
    54
                    <arg value="${dollar}{sources.${count}.revision}"/>
977
293f16b1c667 Retry "module" for ant scripts, initially used by source syncing operations.
Simon Howkins <simonh@symbian.org>
parents: 952
diff changeset
    55
                    <arg value="-q"/>
293f16b1c667 Retry "module" for ant scripts, initially used by source syncing operations.
Simon Howkins <simonh@symbian.org>
parents: 952
diff changeset
    56
                </exec>
293f16b1c667 Retry "module" for ant scripts, initially used by source syncing operations.
Simon Howkins <simonh@symbian.org>
parents: 952
diff changeset
    57
                <loadfile property="sf.sourcesync.${count}.checksum" srcFile="${ant['temp.build.dir']}/sf.sourcesync.${count}.checksum"/>
293f16b1c667 Retry "module" for ant scripts, initially used by source syncing operations.
Simon Howkins <simonh@symbian.org>
parents: 952
diff changeset
    58
                <propertyregex property="sf.sourcesync.${count}.checksum" override="true" input="${dollar}{sf.sourcesync.${count}.checksum}" regexp="(\S{12})" select="\1"/>
293f16b1c667 Retry "module" for ant scripts, initially used by source syncing operations.
Simon Howkins <simonh@symbian.org>
parents: 952
diff changeset
    59
            </sequential>
293f16b1c667 Retry "module" for ant scripts, initially used by source syncing operations.
Simon Howkins <simonh@symbian.org>
parents: 952
diff changeset
    60
        </retry>
1206
4518bca1baf0 Improved diagnostic output: when the build fails because a package cannot be cloned into the build drive, it says which package and the repo source and destination.
Simon Howkins <simonh@symbian.org>
parents: 1173
diff changeset
    61
        <fail unless="sf.sourcesync.${count}.checksum" message="Failed to get changeset ID for revision '${dollar}{sources.${count}.revision}' for repo ${dollar}{sources.${count}.URL}"/>
977
293f16b1c667 Retry "module" for ant scripts, initially used by source syncing operations.
Simon Howkins <simonh@symbian.org>
parents: 952
diff changeset
    62
892
24ecf67cba71 Bug 1661: Improve build speed with better caching strategy
Simon Howkins <simonh@symbian.org>
parents: 890
diff changeset
    63
        <if>
24ecf67cba71 Bug 1661: Improve build speed with better caching strategy
Simon Howkins <simonh@symbian.org>
parents: 890
diff changeset
    64
            <and>
24ecf67cba71 Bug 1661: Improve build speed with better caching strategy
Simon Howkins <simonh@symbian.org>
parents: 890
diff changeset
    65
                <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
    66
                <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
    67
            </and>
24ecf67cba71 Bug 1661: Improve build speed with better caching strategy
Simon Howkins <simonh@symbian.org>
parents: 890
diff changeset
    68
            <then>
24ecf67cba71 Bug 1661: Improve build speed with better caching strategy
Simon Howkins <simonh@symbian.org>
parents: 890
diff changeset
    69
                <!-- Package in cache already -->
977
293f16b1c667 Retry "module" for ant scripts, initially used by source syncing operations.
Simon Howkins <simonh@symbian.org>
parents: 952
diff changeset
    70
                <retry tries="3" uniquename="${count}" failonerror="0">
293f16b1c667 Retry "module" for ant scripts, initially used by source syncing operations.
Simon Howkins <simonh@symbian.org>
parents: 952
diff changeset
    71
                    <sequential>
1042
f505fa5486eb Add new property sf.spec.sources.revision to override revisions of source repos
Dario Sestito <darios@symbian.org>
parents: 977
diff changeset
    72
                        <echo message="Pull from ${dollar}{sources.${count}.URL} to ${dollar}{sf.spec.sourcesync.cachelocation.${count}}"/>
977
293f16b1c667 Retry "module" for ant scripts, initially used by source syncing operations.
Simon Howkins <simonh@symbian.org>
parents: 952
diff changeset
    73
                        <exec executable="hg" dir="${dollar}{sf.spec.sourcesync.cachelocation.${count}}" failonerror="true">
293f16b1c667 Retry "module" for ant scripts, initially used by source syncing operations.
Simon Howkins <simonh@symbian.org>
parents: 952
diff changeset
    74
                            <arg value="pull"/>
1042
f505fa5486eb Add new property sf.spec.sources.revision to override revisions of source repos
Dario Sestito <darios@symbian.org>
parents: 977
diff changeset
    75
                            <arg value="${dollar}{sources.${count}.URL}"/>
977
293f16b1c667 Retry "module" for ant scripts, initially used by source syncing operations.
Simon Howkins <simonh@symbian.org>
parents: 952
diff changeset
    76
                        </exec>
293f16b1c667 Retry "module" for ant scripts, initially used by source syncing operations.
Simon Howkins <simonh@symbian.org>
parents: 952
diff changeset
    77
                        <property name="sf.spec.sourcesync.cache.pull.succeeded.${count}" value="1"/>
293f16b1c667 Retry "module" for ant scripts, initially used by source syncing operations.
Simon Howkins <simonh@symbian.org>
parents: 952
diff changeset
    78
                    </sequential>
293f16b1c667 Retry "module" for ant scripts, initially used by source syncing operations.
Simon Howkins <simonh@symbian.org>
parents: 952
diff changeset
    79
                </retry>
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
    80
                <if>
977
293f16b1c667 Retry "module" for ant scripts, initially used by source syncing operations.
Simon Howkins <simonh@symbian.org>
parents: 952
diff changeset
    81
                    <isset property="sf.spec.sourcesync.cache.pull.succeeded.${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
    82
                    <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
    83
                        <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
    84
                        <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
    85
                            <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
    86
                            <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
    87
                            <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
    88
                            <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
    89
                            <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
    90
                        </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
    91
                    </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
    92
                    <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
    93
                        <!-- 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
    94
                        <!-- (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
    95
                        <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
    96
                            <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
    97
                                <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
    98
                            </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
    99
                            <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
   100
                                <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
   101
                                <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
   102
                                    <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
   103
                                    <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
   104
                                </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
   105
                            </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
   106
                        </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
   107
                        <!-- In the meantime, by-pass it for this build -->
1206
4518bca1baf0 Improved diagnostic output: when the build fails because a package cannot be cloned into the build drive, it says which package and the repo source and destination.
Simon Howkins <simonh@symbian.org>
parents: 1173
diff changeset
   108
                        <retry tries="30" uniquename="${count}" failonerror="false">
977
293f16b1c667 Retry "module" for ant scripts, initially used by source syncing operations.
Simon Howkins <simonh@symbian.org>
parents: 952
diff changeset
   109
                            <sequential>
1042
f505fa5486eb Add new property sf.spec.sources.revision to override revisions of source repos
Dario Sestito <darios@symbian.org>
parents: 977
diff changeset
   110
                                <echo message="Clone from ${dollar}{sources.${count}.URL} to ${ant['build.drive']}${pkg_detail.dst}"/>
977
293f16b1c667 Retry "module" for ant scripts, initially used by source syncing operations.
Simon Howkins <simonh@symbian.org>
parents: 952
diff changeset
   111
                                <exec executable="hg" dir="${ant['build.drive']}/" failonerror="true">
293f16b1c667 Retry "module" for ant scripts, initially used by source syncing operations.
Simon Howkins <simonh@symbian.org>
parents: 952
diff changeset
   112
                                    <arg value="clone"/>
293f16b1c667 Retry "module" for ant scripts, initially used by source syncing operations.
Simon Howkins <simonh@symbian.org>
parents: 952
diff changeset
   113
                                    <arg value="-U"/>
1042
f505fa5486eb Add new property sf.spec.sources.revision to override revisions of source repos
Dario Sestito <darios@symbian.org>
parents: 977
diff changeset
   114
                                    <arg value="${dollar}{sources.${count}.URL}"/>
977
293f16b1c667 Retry "module" for ant scripts, initially used by source syncing operations.
Simon Howkins <simonh@symbian.org>
parents: 952
diff changeset
   115
                                    <arg value="${ant['build.drive']}${pkg_detail.dst}"/>
293f16b1c667 Retry "module" for ant scripts, initially used by source syncing operations.
Simon Howkins <simonh@symbian.org>
parents: 952
diff changeset
   116
                                </exec>
1206
4518bca1baf0 Improved diagnostic output: when the build fails because a package cannot be cloned into the build drive, it says which package and the repo source and destination.
Simon Howkins <simonh@symbian.org>
parents: 1173
diff changeset
   117
                                <property name="sf.spec.sourcesync.cache.clone.succeeded.${count}" value="1"/>
977
293f16b1c667 Retry "module" for ant scripts, initially used by source syncing operations.
Simon Howkins <simonh@symbian.org>
parents: 952
diff changeset
   118
                            </sequential>
293f16b1c667 Retry "module" for ant scripts, initially used by source syncing operations.
Simon Howkins <simonh@symbian.org>
parents: 952
diff changeset
   119
                            <cleanup>
293f16b1c667 Retry "module" for ant scripts, initially used by source syncing operations.
Simon Howkins <simonh@symbian.org>
parents: 952
diff changeset
   120
                                <delete dir="${ant['build.drive']}${pkg_detail.dst}"/>
293f16b1c667 Retry "module" for ant scripts, initially used by source syncing operations.
Simon Howkins <simonh@symbian.org>
parents: 952
diff changeset
   121
                            </cleanup>
293f16b1c667 Retry "module" for ant scripts, initially used by source syncing operations.
Simon Howkins <simonh@symbian.org>
parents: 952
diff changeset
   122
                        </retry>
1206
4518bca1baf0 Improved diagnostic output: when the build fails because a package cannot be cloned into the build drive, it says which package and the repo source and destination.
Simon Howkins <simonh@symbian.org>
parents: 1173
diff changeset
   123
                        <fail unless="sf.spec.sourcesync.cache.clone.succeeded.${count}" message="ERROR: Failed to clone ${dollar}{sources.${count}.URL} to ${ant['build.drive']}${pkg_detail.dst}"/>
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
   124
                    </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
   125
                </if>
892
24ecf67cba71 Bug 1661: Improve build speed with better caching strategy
Simon Howkins <simonh@symbian.org>
parents: 890
diff changeset
   126
                <!-- Update to required revision -->
24ecf67cba71 Bug 1661: Improve build speed with better caching strategy
Simon Howkins <simonh@symbian.org>
parents: 890
diff changeset
   127
                <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
   128
                    <arg value="update"/>
24ecf67cba71 Bug 1661: Improve build speed with better caching strategy
Simon Howkins <simonh@symbian.org>
parents: 890
diff changeset
   129
                    <arg value="-r"/>
952
ea541face66b Re-apply changes to allow sources.csv to specify a revision by a *local* tag in the web repository.
Simon Howkins <simonh@symbian.org>
parents: 949
diff changeset
   130
                    <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
   131
                </exec>
24ecf67cba71 Bug 1661: Improve build speed with better caching strategy
Simon Howkins <simonh@symbian.org>
parents: 890
diff changeset
   132
            </then>
24ecf67cba71 Bug 1661: Improve build speed with better caching strategy
Simon Howkins <simonh@symbian.org>
parents: 890
diff changeset
   133
            <else>
977
293f16b1c667 Retry "module" for ant scripts, initially used by source syncing operations.
Simon Howkins <simonh@symbian.org>
parents: 952
diff changeset
   134
                <!-- Package not in cache, or cache not in use -->
1206
4518bca1baf0 Improved diagnostic output: when the build fails because a package cannot be cloned into the build drive, it says which package and the repo source and destination.
Simon Howkins <simonh@symbian.org>
parents: 1173
diff changeset
   135
                <retry tries="10" uniquename="${count}" failonerror="false">
977
293f16b1c667 Retry "module" for ant scripts, initially used by source syncing operations.
Simon Howkins <simonh@symbian.org>
parents: 952
diff changeset
   136
                    <sequential>
1042
f505fa5486eb Add new property sf.spec.sources.revision to override revisions of source repos
Dario Sestito <darios@symbian.org>
parents: 977
diff changeset
   137
                        <echo message="Clone from ${dollar}{sources.${count}.URL} to ${ant['build.drive']}${pkg_detail.dst}"/>
977
293f16b1c667 Retry "module" for ant scripts, initially used by source syncing operations.
Simon Howkins <simonh@symbian.org>
parents: 952
diff changeset
   138
                        <exec executable="hg" dir="${ant['build.drive']}/" failonerror="true">
293f16b1c667 Retry "module" for ant scripts, initially used by source syncing operations.
Simon Howkins <simonh@symbian.org>
parents: 952
diff changeset
   139
                            <arg value="clone"/>
293f16b1c667 Retry "module" for ant scripts, initially used by source syncing operations.
Simon Howkins <simonh@symbian.org>
parents: 952
diff changeset
   140
                            <arg value="-U"/>
1042
f505fa5486eb Add new property sf.spec.sources.revision to override revisions of source repos
Dario Sestito <darios@symbian.org>
parents: 977
diff changeset
   141
                            <arg value="${dollar}{sources.${count}.URL}"/>
977
293f16b1c667 Retry "module" for ant scripts, initially used by source syncing operations.
Simon Howkins <simonh@symbian.org>
parents: 952
diff changeset
   142
                            <arg value="${ant['build.drive']}${pkg_detail.dst}"/>
293f16b1c667 Retry "module" for ant scripts, initially used by source syncing operations.
Simon Howkins <simonh@symbian.org>
parents: 952
diff changeset
   143
                        </exec>
1206
4518bca1baf0 Improved diagnostic output: when the build fails because a package cannot be cloned into the build drive, it says which package and the repo source and destination.
Simon Howkins <simonh@symbian.org>
parents: 1173
diff changeset
   144
                        <property name="sf.spec.sourcesync.cache.clone.succeeded.${count}" value="1"/>
977
293f16b1c667 Retry "module" for ant scripts, initially used by source syncing operations.
Simon Howkins <simonh@symbian.org>
parents: 952
diff changeset
   145
                    </sequential>
293f16b1c667 Retry "module" for ant scripts, initially used by source syncing operations.
Simon Howkins <simonh@symbian.org>
parents: 952
diff changeset
   146
                    <cleanup>
293f16b1c667 Retry "module" for ant scripts, initially used by source syncing operations.
Simon Howkins <simonh@symbian.org>
parents: 952
diff changeset
   147
                        <delete dir="${ant['build.drive']}${pkg_detail.dst}"/>
293f16b1c667 Retry "module" for ant scripts, initially used by source syncing operations.
Simon Howkins <simonh@symbian.org>
parents: 952
diff changeset
   148
                    </cleanup>
293f16b1c667 Retry "module" for ant scripts, initially used by source syncing operations.
Simon Howkins <simonh@symbian.org>
parents: 952
diff changeset
   149
                </retry>
1206
4518bca1baf0 Improved diagnostic output: when the build fails because a package cannot be cloned into the build drive, it says which package and the repo source and destination.
Simon Howkins <simonh@symbian.org>
parents: 1173
diff changeset
   150
                <fail unless="sf.spec.sourcesync.cache.clone.succeeded.${count}" message="ERROR: Failed to clone ${dollar}{sources.${count}.URL} to ${ant['build.drive']}${pkg_detail.dst}"/>
892
24ecf67cba71 Bug 1661: Improve build speed with better caching strategy
Simon Howkins <simonh@symbian.org>
parents: 890
diff changeset
   151
                <!-- Update to required version -->
24ecf67cba71 Bug 1661: Improve build speed with better caching strategy
Simon Howkins <simonh@symbian.org>
parents: 890
diff changeset
   152
                <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
   153
                    <arg value="update"/>
24ecf67cba71 Bug 1661: Improve build speed with better caching strategy
Simon Howkins <simonh@symbian.org>
parents: 890
diff changeset
   154
                    <arg value="-r"/>
952
ea541face66b Re-apply changes to allow sources.csv to specify a revision by a *local* tag in the web repository.
Simon Howkins <simonh@symbian.org>
parents: 949
diff changeset
   155
                    <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
   156
                </exec>
24ecf67cba71 Bug 1661: Improve build speed with better caching strategy
Simon Howkins <simonh@symbian.org>
parents: 890
diff changeset
   157
                <if>
24ecf67cba71 Bug 1661: Improve build speed with better caching strategy
Simon Howkins <simonh@symbian.org>
parents: 890
diff changeset
   158
                    <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
   159
                    <then>
1206
4518bca1baf0 Improved diagnostic output: when the build fails because a package cannot be cloned into the build drive, it says which package and the repo source and destination.
Simon Howkins <simonh@symbian.org>
parents: 1173
diff changeset
   160
                        <!-- Init cache -->
4518bca1baf0 Improved diagnostic output: when the build fails because a package cannot be cloned into the build drive, it says which package and the repo source and destination.
Simon Howkins <simonh@symbian.org>
parents: 1173
diff changeset
   161
                        <mkdir dir="${dollar}{sf.spec.sourcesync.cachelocation.${count}}"/>
4518bca1baf0 Improved diagnostic output: when the build fails because a package cannot be cloned into the build drive, it says which package and the repo source and destination.
Simon Howkins <simonh@symbian.org>
parents: 1173
diff changeset
   162
                        <delete dir="${dollar}{sf.spec.sourcesync.cachelocation.${count}}" failonerror="true" />
4518bca1baf0 Improved diagnostic output: when the build fails because a package cannot be cloned into the build drive, it says which package and the repo source and destination.
Simon Howkins <simonh@symbian.org>
parents: 1173
diff changeset
   163
                        <echo message="Initialise cache at ${dollar}{sf.spec.sourcesync.cachelocation.${count}}"/>
4518bca1baf0 Improved diagnostic output: when the build fails because a package cannot be cloned into the build drive, it says which package and the repo source and destination.
Simon Howkins <simonh@symbian.org>
parents: 1173
diff changeset
   164
                        <!-- Initialise an empty repo -->
4518bca1baf0 Improved diagnostic output: when the build fails because a package cannot be cloned into the build drive, it says which package and the repo source and destination.
Simon Howkins <simonh@symbian.org>
parents: 1173
diff changeset
   165
                        <exec executable="hg" dir="${ant['build.drive']}/" failonerror="false">
4518bca1baf0 Improved diagnostic output: when the build fails because a package cannot be cloned into the build drive, it says which package and the repo source and destination.
Simon Howkins <simonh@symbian.org>
parents: 1173
diff changeset
   166
                            <arg value="init"/>
4518bca1baf0 Improved diagnostic output: when the build fails because a package cannot be cloned into the build drive, it says which package and the repo source and destination.
Simon Howkins <simonh@symbian.org>
parents: 1173
diff changeset
   167
                            <arg value="${dollar}{sf.spec.sourcesync.cachelocation.${count}}"/>
4518bca1baf0 Improved diagnostic output: when the build fails because a package cannot be cloned into the build drive, it says which package and the repo source and destination.
Simon Howkins <simonh@symbian.org>
parents: 1173
diff changeset
   168
                        </exec>
4518bca1baf0 Improved diagnostic output: when the build fails because a package cannot be cloned into the build drive, it says which package and the repo source and destination.
Simon Howkins <simonh@symbian.org>
parents: 1173
diff changeset
   169
                        <!-- Configure the paths and the speed-up flag on the cache repo -->
4518bca1baf0 Improved diagnostic output: when the build fails because a package cannot be cloned into the build drive, it says which package and the repo source and destination.
Simon Howkins <simonh@symbian.org>
parents: 1173
diff changeset
   170
                        <echo file="${dollar}{sf.spec.sourcesync.cachelocation.${count}}/.hg/hgrc" append="false" message="[paths]${dollar}{line.separator}"/>
4518bca1baf0 Improved diagnostic output: when the build fails because a package cannot be cloned into the build drive, it says which package and the repo source and destination.
Simon Howkins <simonh@symbian.org>
parents: 1173
diff changeset
   171
                        <echo file="${dollar}{sf.spec.sourcesync.cachelocation.${count}}/.hg/hgrc" append="true" message="default = ${dollar}{sources.${count}.URL}${dollar}{line.separator}"/>
4518bca1baf0 Improved diagnostic output: when the build fails because a package cannot be cloned into the build drive, it says which package and the repo source and destination.
Simon Howkins <simonh@symbian.org>
parents: 1173
diff changeset
   172
                        <echo file="${dollar}{sf.spec.sourcesync.cachelocation.${count}}/.hg/hgrc" append="true" message="${dollar}{line.separator}"/>
4518bca1baf0 Improved diagnostic output: when the build fails because a package cannot be cloned into the build drive, it says which package and the repo source and destination.
Simon Howkins <simonh@symbian.org>
parents: 1173
diff changeset
   173
                        <echo file="${dollar}{sf.spec.sourcesync.cachelocation.${count}}/.hg/hgrc" append="true" message="[server]${dollar}{line.separator}"/>
4518bca1baf0 Improved diagnostic output: when the build fails because a package cannot be cloned into the build drive, it says which package and the repo source and destination.
Simon Howkins <simonh@symbian.org>
parents: 1173
diff changeset
   174
                        <echo file="${dollar}{sf.spec.sourcesync.cachelocation.${count}}/.hg/hgrc" append="true" message="uncompressed=True${dollar}{line.separator}"/>
4518bca1baf0 Improved diagnostic output: when the build fails because a package cannot be cloned into the build drive, it says which package and the repo source and destination.
Simon Howkins <simonh@symbian.org>
parents: 1173
diff changeset
   175
                        <echo message="(Push from ${ant['build.drive']}${pkg_detail.dst} to ${dollar}{sf.spec.sourcesync.cachelocation.${count}} in background)"/>
892
24ecf67cba71 Bug 1661: Improve build speed with better caching strategy
Simon Howkins <simonh@symbian.org>
parents: 890
diff changeset
   176
                        <forget>
24ecf67cba71 Bug 1661: Improve build speed with better caching strategy
Simon Howkins <simonh@symbian.org>
parents: 890
diff changeset
   177
                            <nice newpriority="1"/>
24ecf67cba71 Bug 1661: Improve build speed with better caching strategy
Simon Howkins <simonh@symbian.org>
parents: 890
diff changeset
   178
                            <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
   179
                                <arg value="push"/>
24ecf67cba71 Bug 1661: Improve build speed with better caching strategy
Simon Howkins <simonh@symbian.org>
parents: 890
diff changeset
   180
                                <arg value="-f"/>
24ecf67cba71 Bug 1661: Improve build speed with better caching strategy
Simon Howkins <simonh@symbian.org>
parents: 890
diff changeset
   181
                                <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
   182
                            </exec>
24ecf67cba71 Bug 1661: Improve build speed with better caching strategy
Simon Howkins <simonh@symbian.org>
parents: 890
diff changeset
   183
                        </forget>
24ecf67cba71 Bug 1661: Improve build speed with better caching strategy
Simon Howkins <simonh@symbian.org>
parents: 890
diff changeset
   184
                    </then>
24ecf67cba71 Bug 1661: Improve build speed with better caching strategy
Simon Howkins <simonh@symbian.org>
parents: 890
diff changeset
   185
                </if>
24ecf67cba71 Bug 1661: Improve build speed with better caching strategy
Simon Howkins <simonh@symbian.org>
parents: 890
diff changeset
   186
            </else>
24ecf67cba71 Bug 1661: Improve build speed with better caching strategy
Simon Howkins <simonh@symbian.org>
parents: 890
diff changeset
   187
        </if>
68
c86f60d45216 Make BOM identify thread safe
BuildAdmin@LON-ENGBUILD87
parents: 62
diff changeset
   188
    </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
   189
    
68
c86f60d45216 Make BOM identify thread safe
BuildAdmin@LON-ENGBUILD87
parents: 62
diff changeset
   190
    <target name="sf-bom-info-${count}">
1173
7659931b2194 Add BOM info to the BIT db
Dario Sestito <darios@symbian.org>
parents: 1044
diff changeset
   191
        <!-- record info on source code repo/rev in BOM file and in BIT file -->
1042
f505fa5486eb Add new property sf.spec.sources.revision to override revisions of source repos
Dario Sestito <darios@symbian.org>
parents: 977
diff changeset
   192
        <echo file="${ant['build.drive']}/output/logs/BOM/sources.csv" append="true" message="${dollar}{sources.${count}.URL},${pkg_detail.dst},changeset,${dollar}{sf.sourcesync.${count}.checksum},${pkg_detail.sysdef}${dollar}{line.separator}"/>
1173
7659931b2194 Add BOM info to the BIT db
Dario Sestito <darios@symbian.org>
parents: 1044
diff changeset
   193
        <echo message="content&#x0009;sources,${dollar}{sources.${count}.URL},${dollar}{sf.sourcesync.${count}.checksum}&#x000d;&#x000a;" file="${ant['build.log.dir']}/bitinfo.txt" append="true"/>
7
389e1e1f1583 Rename and move of generated source sync xml and also tidy up
shaberazvi@LON-ENGBUILD88.prod.ad.symbian.intra
parents:
diff changeset
   194
    </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
   195
    
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
   196
    <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
   197
        <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
   198
            <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
   199
                <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
   200
                    <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
   201
                    <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
   202
                </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
   203
            </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
   204
        </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
   205
        <echo message="Writing BOM changes since ${dollar}{sf.previous.pdk.tag} for ${pkg_detail.dst}" />
1042
f505fa5486eb Add new property sf.spec.sources.revision to override revisions of source repos
Dario Sestito <darios@symbian.org>
parents: 977
diff changeset
   206
        <echo file="${ant['build.drive']}/output/logs/BOM/changes.txt" append="true" message="${dollar}{line.separator}${dollar}{sources.${count}.URL}${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
   207
            <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
   208
                <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
   209
                <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
   210
                <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
   211
                <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
   212
            </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
   213
    </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
   214
    
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
   215
    <#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
   216
    <#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
   217
    <#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
   218
    <#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
   219
    <#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
   220
  </#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
   221
</#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
   222
    
7
389e1e1f1583 Rename and move of generated source sync xml and also tidy up
shaberazvi@LON-ENGBUILD88.prod.ad.symbian.intra
parents:
diff changeset
   223
    <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
   224
        <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
   225
        ${fileset}
389e1e1f1583 Rename and move of generated source sync xml and also tidy up
shaberazvi@LON-ENGBUILD88.prod.ad.symbian.intra
parents:
diff changeset
   226
    </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
   227
    
41f3579ef67e Indentation and other minor changes to make the file easier to read and understand.
Simon Howkins <simonh@symbian.org>
parents: 856
diff changeset
   228
    <target name="all">
892
24ecf67cba71 Bug 1661: Improve build speed with better caching strategy
Simon Howkins <simonh@symbian.org>
parents: 890
diff changeset
   229
        <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
   230
            ${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
   231
        </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
   232
        
41f3579ef67e Indentation and other minor changes to make the file easier to read and understand.
Simon Howkins <simonh@symbian.org>
parents: 856
diff changeset
   233
        <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
   234
        <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
   235
        <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
   236
        
41f3579ef67e Indentation and other minor changes to make the file easier to read and understand.
Simon Howkins <simonh@symbian.org>
parents: 856
diff changeset
   237
        ${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
   238
        
41f3579ef67e Indentation and other minor changes to make the file easier to read and understand.
Simon Howkins <simonh@symbian.org>
parents: 856
diff changeset
   239
        <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
   240
        
41f3579ef67e Indentation and other minor changes to make the file easier to read and understand.
Simon Howkins <simonh@symbian.org>
parents: 856
diff changeset
   241
        ${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
   242
    </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
   243
    
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
   244
</project>