Subversion Repositories DevTools

Rev

Rev 864 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 864 Rev 866
Line 1... Line 1...
1
package com.erggroup.buildtool.ripple;
1
package com.erggroup.buildtool.ripple;
2
 
2
 
3
import java.io.File;
3
import java.io.File;
4
 
4
 
5
import java.io.FileWriter;
-
 
6
 
-
 
7
import java.sql.SQLException;
5
import java.sql.SQLException;
8
 
6
 
9
import java.util.Iterator;
7
import java.util.Iterator;
-
 
8
import java.util.ListIterator;
10
import java.util.Vector;
9
import java.util.Vector;
11
 
10
 
12
import org.apache.log4j.Logger;
11
import org.apache.log4j.Logger;
13
 
12
 
14
import java.util.regex.PatternSyntaxException;
13
import java.util.regex.PatternSyntaxException;
Line 21... Line 20...
21
   * limited to the following items "win32", "sparc", "solaris10_sparc32", "solaris10_x86", "linux_i386"
20
   * limited to the following items "win32", "sparc", "solaris10_sparc32", "solaris10_x86", "linux_i386"
22
   * accessed by Package::isLinuxBuilt, isSolarisBuilt, isWin32Built
21
   * accessed by Package::isLinuxBuilt, isSolarisBuilt, isWin32Built
23
   * @attribute
22
   * @attribute
24
   */
23
   */
25
  Vector<String> mGbeMachtypeCollection = new Vector<String>();
24
  Vector<String> mGbeMachtypeCollection = new Vector<String>();
26
 
25
  
27
  /**configured mail server
26
  /**configured mail server
28
   * @attribute
27
   * @attribute
29
   */
28
   */
30
  String mMailServer = new String();
29
  String mMailServer = new String();
31
 
30
 
Line 52... Line 51...
52
  /**set to "non generic", "generic" or "dummy" to indicate the nature of the package in the build file in daemon mode
51
  /**set to "non generic", "generic" or "dummy" to indicate the nature of the package in the build file in daemon mode
53
   * @attribute
52
   * @attribute
54
   */
53
   */
55
  String mAddendum = new String("dummy");
54
  String mAddendum = new String("dummy");
56
 
55
 
-
 
56
  /**collection of build exceptions associated with the baseline
-
 
57
  /* used to determine (and report) what change in build exceptions happens as part of planRelease
-
 
58
   * deamon centric
-
 
59
   * @aggregation shared
-
 
60
   * @attribute
-
 
61
   */
-
 
62
  Vector<BuildExclusion> mBuildExclusionCollection = new Vector<BuildExclusion>();
-
 
63
 
57
  /**Logger
64
  /**Logger
58
   * @attribute
65
   * @attribute
59
   */
66
   */
60
  private static final Logger mLogger = Logger.getLogger(RippleEngine.class);
67
  private static final Logger mLogger = Logger.getLogger(RippleEngine.class);
61
 
68
 
Line 63... Line 70...
63
   * @attribute
70
   * @attribute
64
   */
71
   */
65
  private Vector<String> mEscrowClearcaseSupportCollection = new Vector<String>();
72
  private Vector<String> mEscrowClearcaseSupportCollection = new Vector<String>();
66
 
73
 
67
  /**package versions representing the baseline
74
  /**package versions representing the baseline
-
 
75
   * escrow centric
68
   * @aggregation shared
76
   * @aggregation shared
69
   * @attribute
77
   * @attribute
70
   */
78
   */
71
  private Vector<Package> mPackageCollection = new Vector<Package>();
79
  private Vector<Package> mPackageCollection = new Vector<Package>();
72
 
80
 
Line 128... Line 136...
128
 
136
 
129
    if ( mDaemon )
137
    if ( mDaemon )
130
    {
138
    {
131
      // claim the mutex
139
      // claim the mutex
132
      mReleaseManager.claimMutex();
140
      mReleaseManager.claimMutex();
-
 
141
      mBuildExclusionCollection.removeAllElements();
-
 
142
      Vector<BuildExclusion> tempBuildExclusionCollection = new Vector<BuildExclusion>();
-
 
143
      
-
 
144
      mReleaseManager.queryBuildExclusions(tempBuildExclusionCollection, mBaseline);
-
 
145
      
-
 
146
      // only populate mBuildExclusionCollection with tempBuildExclusionCollection entries which have a relevant root_pv_id
-
 
147
      // ie the root_pv_id is ONLY relevant if it is null (-1) or it points to a pv_id in the collection
-
 
148
      // the package with a pv_id which is a root_pv_id may be removed ie when fixing a build issue
-
 
149
      for (Iterator<BuildExclusion> it = tempBuildExclusionCollection.iterator(); it.hasNext(); )
-
 
150
      {
-
 
151
        BuildExclusion buildExclusion = it.next();
-
 
152
        
-
 
153
        if ( buildExclusion.isRelevant(tempBuildExclusionCollection) )
-
 
154
        {
-
 
155
          mBuildExclusionCollection.add(buildExclusion);
-
 
156
        }
-
 
157
        else
-
 
158
        {
-
 
159
          // this is just a cosmetic step
-
 
160
          // it includes package versions which have been indirectly excluded
-
 
161
          // the build daemon ignores this information, but it serves to clarify this point to users
-
 
162
          buildExclusion.includeToBuild(mReleaseManager, mBaseline);
-
 
163
        }
-
 
164
      }
133
    }
165
    }
134
    
166
    
135
    collectMetaData();
167
    collectMetaData();
136
    
168
    
137
    mReleaseManager.queryPackageVersions(this, mPackageCollection, mDaemon, mBaseline);
169
    mReleaseManager.queryPackageVersions(this, mPackageCollection, mDaemon, mBaseline);
Line 148... Line 180...
148
        
180
        
149
        if (dependency == ReleaseManager.NULL_PACKAGE)
181
        if (dependency == ReleaseManager.NULL_PACKAGE)
150
        {
182
        {
151
          mLogger.info("planRelease dependency is not in the baseline " + alias);
183
          mLogger.info("planRelease dependency is not in the baseline " + alias);
152
          // exclude all dependent packages
184
          // exclude all dependent packages
153
          rippleBuildExclude(p);
185
          // max 50 chars
-
 
186
          rippleBuildExclude(p, p.mId, "Package build dependency not in the release", null);
154
           
187
           
155
          // take the package out of the build
188
          // take the package out of the build
156
          p.mBuildFile = -4;
189
          p.mBuildFile = -4;
157
          mLogger.warn("planRelease set mBuildFile to -4 for package " + p.mAlias );
190
          mLogger.warn("planRelease set mBuildFile to -4 for package " + p.mAlias );
158
          break;
191
          break;
Line 170... Line 203...
170
      if (p.mBuildFile == 0)
203
      if (p.mBuildFile == 0)
171
      {
204
      {
172
        // package has yet to be processed
205
        // package has yet to be processed
173
        if (!p.isReproducible())
206
        if (!p.isReproducible())
174
        {
207
        {
175
          if ( !mDaemon )
-
 
176
          {
-
 
177
            // for escrow build purposes, exclude all dependent package versions
208
          // for escrow build purposes, exclude all dependent package versions
178
            mLogger.info("planRelease package not reproducible " + p.mName);
209
          mLogger.info("planRelease package not reproducible " + p.mName);
179
            rippleBuildExclude(p);
210
          // max 50 chars
180
          }
211
          rippleBuildExclude(p, p.mId, "Package has no build environment", null);
181
          
212
          
182
          // package is not reproducible, discard
213
          // package is not reproducible, discard
183
          p.mBuildFile = -1;
214
          p.mBuildFile = -1;
184
          mLogger.warn("planRelease set mBuildFile to -1 for package " + p.mAlias );
215
          mLogger.warn("planRelease set mBuildFile to -1 for package " + p.mAlias );
185
        }
216
        }
Line 232... Line 263...
232
          }
263
          }
233
        }
264
        }
234
 
265
 
235
        if ( !reproduce )
266
        if ( !reproduce )
236
        {
267
        {
237
          if ( !mDaemon )
-
 
238
          {
-
 
239
            // for escrow build purposes, exclude all dependent package versions
268
          // for escrow build purposes, exclude all dependent package versions
240
            mLogger.info("planRelease package not reproducible on the build platforms configured for this baseline " + p.mName);
269
          mLogger.info("planRelease package not reproducible on the build platforms configured for this baseline " + p.mName);
241
            rippleBuildExclude(p);
270
          // max 50 chars
242
          }
271
          rippleBuildExclude(p, p.mId, "Package not built for configured platforms", null);
243
          
272
          
244
          // package is not reproducible on the build platforms configured for this baseline, discard
273
          // package is not reproducible on the build platforms configured for this baseline, discard
245
          p.mBuildFile = -2;
274
          p.mBuildFile = -2;
246
          mLogger.warn("planRelease set mBuildFile to -2 for package " + p.mAlias );
275
          mLogger.warn("planRelease set mBuildFile to -2 for package " + p.mAlias );
247
        }
276
        }
248
      }
277
      }
249
    }      
278
    }      
250
      
279
      
251
    if (mDaemon)
280
    if (mDaemon)
252
    {
281
    {
253
      // process packages which are not ripple buildable, and all packages dependent upon them      
282
      // process packages which are not ripple buildable, and all packages dependent upon them
254
      for (Iterator<Package> it = mPackageCollection.iterator(); it.hasNext(); )
283
      for (ListIterator<BuildExclusion> it = mBuildExclusionCollection.listIterator(); it.hasNext(); )
255
      {
284
      {
256
        Package p = it.next();
285
        BuildExclusion be = it.next();
257
 
286
        
258
        if (p.mBuildFile == 0)
287
        for (Iterator<Package> it1 = mPackageCollection.iterator(); it1.hasNext(); )
259
        {
288
        {
260
          // package has yet to be processed
289
          Package p = it1.next();
-
 
290
          
261
          if (p.mDoNotRipple)
291
          if ( be.compare(p.mId) )
262
          {
292
          {
-
 
293
            if ( p.mBuildFile == 0 )
-
 
294
            {
263
            // exclude all dependent package versions
295
              // exclude all dependent package versions
264
            mLogger.info("planRelease do not ripple " + p.mName);
296
              mLogger.info("planRelease do not ripple " + p.mName);
-
 
297
              // provide the root id and cause as recorded in the database
265
            rippleBuildExclude(p);
298
              rippleBuildExclude(p, be, it);
266
            
299
              
267
            // package is not reproducible, discard
300
              // package is not reproducible, discard
268
            p.mBuildFile = -3;
301
              p.mBuildFile = -3;
269
            mLogger.warn("planRelease set mBuildFile to -3 for package " + p.mAlias );
302
              mLogger.warn("planRelease set mBuildFile to -3 for package " + p.mAlias );
-
 
303
            }
-
 
304
            break;
270
          }
305
          }
271
        }
306
        }
272
      }
307
      }
273
      
308
      
274
      // process packages which need to be ripple built
309
      // process packages which need to be ripple built
Line 536... Line 571...
536
            mLogger.warn("planRelease 2 set mBuildFile to " + buildFile + " for package " + p.mAlias );
571
            mLogger.warn("planRelease 2 set mBuildFile to " + buildFile + " for package " + p.mAlias );
537
                        
572
                        
538
            if ( buildFile == 1 )
573
            if ( buildFile == 1 )
539
            {
574
            {
540
              p.applyPV(mReleaseManager, mBaseline);
575
              p.applyPV(mReleaseManager, mBaseline);
541
              // write <rtagId>offical
-
 
542
              boolean createNewFile = rtagIdOfficial.createNewFile();
-
 
543
              
-
 
544
              if ( createNewFile )
-
 
545
              {
-
 
546
                  FileWriter rtagIdOfficialFileWriter = new FileWriter(rtagIdOfficial);
-
 
547
                  rtagIdOfficialFileWriter.append("packageName=" + p.mName + lf);
-
 
548
                  String extension = p.mExtension;
-
 
549
                  String version = p.mVersion;
-
 
550
    
-
 
551
                  if ( extension.length() > 0 )
-
 
552
                  {
-
 
553
                    version += extension;
-
 
554
                  }
-
 
555
    
-
 
556
                  rtagIdOfficialFileWriter.append("packageExtension=" + extension + lf);
-
 
557
                  rtagIdOfficialFileWriter.append("packageVersion=" + version + lf);
-
 
558
                  
-
 
559
                  // depends in the form 'cs','25.1.0000.cr';'Dinkumware_STL','1.0.0.cots'
-
 
560
                  String depends = new String();
-
 
561
                  
-
 
562
                  for (Iterator<Package> it3 = p.mPackageDependencyCollection.iterator(); it3.hasNext(); )
-
 
563
                  {
-
 
564
                    Package depend = it3.next();
-
 
565
                    
-
 
566
                    if ( depends.compareTo( "" ) != 0 )
-
 
567
                    {
-
 
568
                      depends += ";";
-
 
569
                    }
-
 
570
                    depends += "\'" + depend.mName + "\'";
-
 
571
                    depends += ",";
-
 
572
                    String dependsExtension = depend.mExtension;
-
 
573
                    String dependsVersion = depend.mVersion;
-
 
574
                    
-
 
575
                    if ( dependsExtension.length() > 0 )
-
 
576
                    {
-
 
577
                      dependsVersion += dependsExtension;
-
 
578
                    }
-
 
579
                    else
-
 
580
                    {
-
 
581
                      dependsExtension = ".";
-
 
582
                    }
-
 
583
                    depends += "\'" + dependsVersion + "\'";
-
 
584
                  }
-
 
585
                                
-
 
586
                  rtagIdOfficialFileWriter.append("packageDepends=" + depends + lf);
-
 
587
                  
-
 
588
                  if ( p.mDirectlyPlanned )
-
 
589
                  {
-
 
590
                    // a WIP
-
 
591
                    rtagIdOfficialFileWriter.append("packageRipple=0" + lf);
-
 
592
                  }
-
 
593
                  else
-
 
594
                  {
-
 
595
                    // a ripple
-
 
596
                    rtagIdOfficialFileWriter.append("packageRipple=1" + lf);
-
 
597
                  }
-
 
598
                  
-
 
599
                  rtagIdOfficialFileWriter.append("packageVersionID=" + p.mId);
-
 
600
                  
-
 
601
                  rtagIdOfficialFileWriter.close();
-
 
602
              }
-
 
603
              else
-
 
604
              {
-
 
605
                  mLogger.fatal("rtagIdOfficial.createNewFile() returned false");                  
-
 
606
              }
-
 
607
            }
576
            }
608
            else
577
            else
609
            {
578
            {
610
              mLogger.info("planRelease package has future (downgraded) build requirement " + p.mName + " " + buildFile);              
579
              mLogger.info("planRelease package has future (downgraded) build requirement " + p.mName + " " + buildFile);              
611
            }
580
            }
Line 687... Line 656...
687
      }
656
      }
688
      
657
      
689
      buildFileContent += generateTaskdef();
658
      buildFileContent += generateTaskdef();
690
      
659
      
691
      String set_up = new String("");
660
      String set_up = new String("");
-
 
661
      boolean daemonHasTarget = false;
692
      
662
      
693
      for (Iterator<Package> it = mPackageCollection.iterator(); it.hasNext(); )
663
      for (Iterator<Package> it = mPackageCollection.iterator(); it.hasNext(); )
694
      {
664
      {
695
        Package p = it.next();
665
        Package p = it.next();
696
      
666
      
697
        if ( p.mBuildFile > 0 && p.mBuildFile <= buildFile )
667
        if ( p.mBuildFile > 0 && p.mBuildFile <= buildFile )
698
        {
668
        {
699
          buildFileContent += generateTarget(p, buildFile);
669
          buildFileContent += generateTarget(p, buildFile);
-
 
670
          
-
 
671
          if ( p.mBuildFile == 1 )
-
 
672
          {
-
 
673
            daemonHasTarget = true;
-
 
674
          }
700
        }
675
        }
701
        
676
        
702
        if ( !mDaemon && buildFile == 1 )
677
        if ( !mDaemon && buildFile == 1 )
703
        {
678
        {
704
          // for the purposes of the set up, use /
679
          // for the purposes of the set up, use /
Line 718... Line 693...
718
                    + " \"-view=" + p.mAlias + "\""
693
                    + " \"-view=" + p.mAlias + "\""
719
                    + " -root=. -noprefix"
694
                    + " -root=. -noprefix"
720
                    + lf;
695
                    + lf;
721
        }
696
        }
722
      }
697
      }
-
 
698
 
-
 
699
      if ( mDaemon && !daemonHasTarget )
723
       
700
      {
-
 
701
        // must have AbtSetUp, AbtTearDown, and AbtPublish targets
-
 
702
        buildFileContent += "<target name=\"AbtSetUp\"/>" + lf +
-
 
703
                            "<target name=\"AbtTearDown\"/>" + lf +
-
 
704
                            "<target name=\"AbtPublish\"/>" + lf;
-
 
705
      }
-
 
706
      
724
      if ( !mDaemon && buildFile == 1 )
707
      if ( !mDaemon && buildFile == 1 )
725
      {
708
      {
726
        mEscrowClearcaseSupportCollection.add(set_up);
709
        mEscrowClearcaseSupportCollection.add(set_up);
727
        mEscrowClearcaseSupportCollection.add(raw_data);
710
        mEscrowClearcaseSupportCollection.add(raw_data);
728
      }
711
      }
Line 753... Line 736...
753
        
736
        
754
        buildFile++;
737
        buildFile++;
755
      }
738
      }
756
    } while( !allProcessed );
739
    } while( !allProcessed );
757
      
740
      
-
 
741
    if ( mDaemon )
-
 
742
    {
-
 
743
      // report what change in build exceptions happens as part of planRelease
-
 
744
      for (Iterator<BuildExclusion> it = mBuildExclusionCollection.iterator(); it.hasNext(); )
-
 
745
      {
-
 
746
        BuildExclusion buildExclusion = it.next();
-
 
747
        
-
 
748
        if ( !buildExclusion.isProcessed() )
-
 
749
        {
-
 
750
          // notify
-
 
751
          buildExclusion.excludeFromBuild(mReleaseManager, mBaseline);
-
 
752
          buildExclusion.email(mPackageCollection, mMailServer, mMailSender, mBaselineName);
-
 
753
        }
-
 
754
      }
-
 
755
    }
-
 
756
 
758
    mReleaseManager.disconnect();
757
    mReleaseManager.disconnect();
759
    mLogger.warn("planRelease mDaemon " + mDaemon + " returned");
758
    mLogger.warn("planRelease mDaemon " + mDaemon + " returned");
760
  }
759
  }
761
 
760
 
762
  /**returns first build file content
761
  /**returns first build file content
Line 841... Line 840...
841
    return retVal;
840
    return retVal;
842
  }
841
  }
843
 
842
 
844
  /**sets the mBuildFile to -5 for the package and all dependent packages
843
  /**sets the mBuildFile to -5 for the package and all dependent packages
845
   */
844
   */
846
  private void rippleBuildExclude(Package p)
845
  private void rippleBuildExclude(Package p, int root_pv_id, String root_cause, ListIterator<BuildExclusion> list )
847
  {
846
  {
848
    mLogger.debug("rippleBuildExclude");
847
    mLogger.debug("rippleBuildExclude");
849
    if ( p.mBuildFile == 0 )
848
    if ( p.mBuildFile == 0 )
850
    {
849
    {
851
      p.mBuildFile = -5;
850
      p.mBuildFile = -5;
852
      mLogger.warn("rippleBuildExclude set mBuildFile to -5 for package " + p.mAlias );
851
      mLogger.warn("rippleBuildExclude set mBuildFile to -5 for package " + p.mAlias );
-
 
852
      
-
 
853
      // if found, process it, else add it (unprocessed)
-
 
854
      boolean found = false;
-
 
855
      for (Iterator<BuildExclusion> it = mBuildExclusionCollection.iterator(); it.hasNext(); )
-
 
856
      {
-
 
857
        BuildExclusion buildExclusion = it.next();
-
 
858
        
-
 
859
        if ( buildExclusion.compare(p.mId, root_pv_id, root_cause))
-
 
860
        {
-
 
861
          found = true;
-
 
862
          buildExclusion.process();
-
 
863
          break;
-
 
864
        }
-
 
865
      }
-
 
866
      
-
 
867
      if (!found)
-
 
868
      {
-
 
869
        // process all occurrences for this package
-
 
870
        // these will be superceded by a new build exclusion entry
-
 
871
        for (Iterator<BuildExclusion> it = mBuildExclusionCollection.iterator(); it.hasNext(); )
-
 
872
        {
-
 
873
          BuildExclusion buildExclusion = it.next();
-
 
874
          
-
 
875
          if ( buildExclusion.compare(p.mId))
-
 
876
          {
-
 
877
            buildExclusion.process();
-
 
878
          }
-
 
879
        }
-
 
880
        
-
 
881
        // only use root_pv_id if not equal to the pv_id
-
 
882
        // this is to drive a direct build exclusion in the release manager
-
 
883
        int temp = root_pv_id;
-
 
884
        if ( p.mId == root_pv_id )
-
 
885
        {
-
 
886
          // force a null root_pv_id in the database
-
 
887
          temp = -1;
-
 
888
        }
-
 
889
        
-
 
890
        BuildExclusion buildExclusion = new BuildExclusion(p.mId, temp, root_cause);
-
 
891
        
-
 
892
        if ( list == null )
-
 
893
        {
-
 
894
          mBuildExclusionCollection.add(buildExclusion);
-
 
895
        }
-
 
896
        else
-
 
897
        {
-
 
898
          // must use the ListIterator interface to add to the collection whilst iterating through it
-
 
899
          list.add(buildExclusion);
-
 
900
        }
-
 
901
      }
853
          
902
          
854
      for (Iterator<Package> it = mPackageCollection.iterator(); it.hasNext(); )
903
      for (Iterator<Package> it = mPackageCollection.iterator(); it.hasNext(); )
855
      {
904
      {
856
        Package pkg = it.next();
905
        Package pkg = it.next();
857
        
906
        
Line 861... Line 910...
861
          {
910
          {
862
            Package dependency = it2.next();
911
            Package dependency = it2.next();
863
            
912
            
864
            if ( dependency == p )
913
            if ( dependency == p )
865
            {
914
            {
-
 
915
              rippleBuildExclude( pkg, root_pv_id, null, list );
-
 
916
              break;
-
 
917
            }
-
 
918
          }
-
 
919
        }
-
 
920
      }
-
 
921
    }
-
 
922
    mLogger.info("rippleBuildExclude set " + p.mName + " " + p.mBuildFile);
-
 
923
  }
-
 
924
 
-
 
925
  /**sets the mBuildFile to -5 for the package and all dependent packages
-
 
926
   */
-
 
927
  private void rippleBuildExclude(Package p, BuildExclusion buildExclusion, ListIterator<BuildExclusion> list )
-
 
928
  {
-
 
929
    mLogger.debug("rippleBuildExclude");
-
 
930
    if ( p.mBuildFile == 0 )
-
 
931
    {
-
 
932
      p.mBuildFile = -5;
-
 
933
      mLogger.warn("rippleBuildExclude set mBuildFile to -5 for package " + p.mAlias );
-
 
934
      buildExclusion.process();
-
 
935
      
-
 
936
      for (Iterator<Package> it = mPackageCollection.iterator(); it.hasNext(); )
-
 
937
      {
-
 
938
        Package pkg = it.next();
-
 
939
        
-
 
940
        if ( pkg != p )
-
 
941
        {
-
 
942
          for (Iterator<Package> it2 = pkg.mPackageDependencyCollection.iterator(); it2.hasNext(); )
-
 
943
          {
-
 
944
            Package dependency = it2.next();
-
 
945
            
-
 
946
            if ( dependency == p )
-
 
947
            {
866
              rippleBuildExclude( pkg );
948
              rippleBuildExclude( pkg, p.mId, null, list );
867
              break;
949
              break;
868
            }
950
            }
869
          }
951
          }
870
        }
952
        }
871
      }
953
      }
Line 889... Line 971...
889
      retVal +=
971
      retVal +=
890
      "<property name=\"abt_mail_server\" value=\"" + mMailServer + "\"/>" + lf +
972
      "<property name=\"abt_mail_server\" value=\"" + mMailServer + "\"/>" + lf +
891
      "<property name=\"abt_mail_sender\" value=\"" + mMailSender + "\"/>" + lf +
973
      "<property name=\"abt_mail_sender\" value=\"" + mMailSender + "\"/>" + lf +
892
      "<property name=\"abt_rtag_id\" value=\"" + mBaseline + "\"/>" + lf +
974
      "<property name=\"abt_rtag_id\" value=\"" + mBaseline + "\"/>" + lf +
893
      "<property name=\"abt_daemon\" value=\"" + mTimestamp + "\"/>" + lf;
975
      "<property name=\"abt_daemon\" value=\"" + mTimestamp + "\"/>" + lf;
-
 
976
 
-
 
977
      for (Iterator<Package> it = mPackageCollection.iterator(); it.hasNext(); )
-
 
978
      {
-
 
979
        Package p = it.next();
-
 
980
      
-
 
981
        if ( p.mBuildFile == 1 )
-
 
982
        {
-
 
983
          retVal +=
-
 
984
          "<property name=\"abt_package_name\" value=\"" + p.mName + "\"/>" + lf +
-
 
985
          "<property name=\"abt_package_version\" value=\"" + p.mVersion + p.mExtension + "\"/>" + lf +
-
 
986
          "<property name=\"abt_package_extension\" value=\"" + p.mExtension + "\"/>" + lf +
-
 
987
          loc(p, "abt_package_location", lf) +
-
 
988
          "<property name=\"abt_package_depends\" value=\"";
-
 
989
 
-
 
990
          // depends in the form 'cs','25.1.0000.cr';'Dinkumware_STL','1.0.0.cots'
-
 
991
          String depends = new String();
-
 
992
          
-
 
993
          for (Iterator<Package> it3 = p.mPackageDependencyCollection.iterator(); it3.hasNext(); )
-
 
994
          {
-
 
995
            Package depend = it3.next();
-
 
996
            
-
 
997
            if ( depends.compareTo( "" ) != 0 )
-
 
998
            {
-
 
999
              depends += ";";
-
 
1000
            }
-
 
1001
            depends += "\'" + depend.mName + "\'";
-
 
1002
            depends += ",";
-
 
1003
            String dependsExtension = depend.mExtension;
-
 
1004
            String dependsVersion = depend.mVersion;
-
 
1005
            
-
 
1006
            if ( dependsExtension.length() > 0 )
-
 
1007
            {
-
 
1008
              dependsVersion += dependsExtension;
-
 
1009
            }
-
 
1010
            else
-
 
1011
            {
-
 
1012
              dependsExtension = ".";
-
 
1013
            }
-
 
1014
            depends += "\'" + dependsVersion + "\'";
-
 
1015
          }
-
 
1016
          
-
 
1017
          retVal += depends + "\"/>" + lf +
-
 
1018
          "<property name=\"abt_is_ripple\" value=\"";
-
 
1019
          
-
 
1020
          if ( p.mDirectlyPlanned )
-
 
1021
          {
-
 
1022
            retVal += "0";
-
 
1023
          }
-
 
1024
          else
-
 
1025
          {
-
 
1026
            retVal += "1";
-
 
1027
          }
-
 
1028
          
-
 
1029
          retVal += "\"/>" + lf +
-
 
1030
          "<property name=\"abt_package_version_id\" value=\"" + p.mId + "\"/>" + lf +
-
 
1031
          "<property name=\"abt_does_not_require_source_control_interaction\" value=\"";
-
 
1032
                          
-
 
1033
          if ( ! p.mRequiresSourceControlInteraction )
-
 
1034
          {
-
 
1035
            retVal += "true";
-
 
1036
          }
-
 
1037
          else
-
 
1038
          {
-
 
1039
            retVal += "false";
-
 
1040
          }
-
 
1041
            
-
 
1042
          retVal += "\"/>" + lf;
-
 
1043
        }
-
 
1044
      }
894
    }
1045
    }
895
    else
1046
    else
896
    {
1047
    {
897
      retVal +=
1048
      retVal +=
898
      "<property name=\"abt_rtag_id\" value=\"-1\"/>" + lf;
1049
      "<property name=\"abt_rtag_id\" value=\"-1\"/>" + lf;
Line 936... Line 1087...
936
  {
1087
  {
937
    mLogger.debug("generateTaskdef");
1088
    mLogger.debug("generateTaskdef");
938
    String lf = new String( System.getProperty("line.separator") );
1089
    String lf = new String( System.getProperty("line.separator") );
939
    String retVal = new String("");
1090
    String retVal = new String("");
940
    retVal +=
1091
    retVal +=
941
    "<taskdef name=\"abt\" classname=\"com.erggroup.buildtool.ABT\"/>" + lf;
1092
    "<taskdef name=\"abt\" classname=\"com.erggroup.buildtool.abt.ABT\"/>" + lf;
942
    return retVal;
1093
    return retVal;
943
  }
1094
  }
944
 
1095
 
945
  /**returns an ant target for the passed Package
1096
  /**returns an ant target for the passed Package
946
   * in daemon mode:
1097
   * in daemon mode:
Line 1678... Line 1829...
1678
    }
1829
    }
1679
    
1830
    
1680
    mLogger.info("buildInfo returned " + platforms + standards);
1831
    mLogger.info("buildInfo returned " + platforms + standards);
1681
    return platforms + standards;
1832
    return platforms + standards;
1682
  }
1833
  }
-
 
1834
 
1683
}
1835
}