Subversion Repositories DevTools

Rev

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

Rev 854 Rev 864
Line 42... Line 42...
42
  String mLabel = new String();
42
  String mLabel = new String();
43
 
43
 
44
  /**build standards
44
  /**build standards
45
   * @attribute
45
   * @attribute
46
   */
46
   */
47
  Vector mBuildStandardCollection = new Vector();
47
  Vector<BuildStandard> mBuildStandardCollection = new Vector<BuildStandard>();
48
 
48
 
49
  /**GBE_MACHTYPE used to build generic packages for this baseline
49
  /**GBE_MACHTYPE used to build generic packages for this baseline
50
   * only has meaning in the daemon build, not the escrow build
50
   * only has meaning in the daemon build, not the escrow build
51
   * accessed by BuildStandard::getPlatform, getBuildStandard
51
   * accessed by BuildStandard::getPlatform, getBuildStandard
52
   * @attribute
52
   * @attribute
Line 54... Line 54...
54
  public static final String mGenericMachtype = System.getenv("GBE_MACHTYPE");
54
  public static final String mGenericMachtype = System.getenv("GBE_MACHTYPE");
55
 
55
 
56
  /**build dependencies by package alias
56
  /**build dependencies by package alias
57
   * @attribute
57
   * @attribute
58
   */
58
   */
59
  Vector mDependencyCollection = new Vector();
59
  Vector<String> mDependencyCollection = new Vector<String>();
60
 
60
 
61
  /**primary package version key pv_id in database
61
  /**primary package version key pv_id in database
62
   * @attribute
62
   * @attribute
63
   */
63
   */
64
  int mId;
64
  int mId;
Line 74... Line 74...
74
  Package.VersionNumberingStandard mRippleField = new VersionNumberingStandard();
74
  Package.VersionNumberingStandard mRippleField = new VersionNumberingStandard();
75
 
75
 
76
  /**interested owners
76
  /**interested owners
77
   * @attribute
77
   * @attribute
78
   */
78
   */
79
  Vector mBuildFailureEmailCollection = new Vector();
79
  private Vector<String> mBuildFailureEmailCollection = new Vector<String>();
80
 
80
 
81
  /**when true will trigger unit tests as part of the package build phase in daemon mode
81
  /**when true will trigger unit tests as part of the package build phase in daemon mode
82
   * @attribute
82
   * @attribute
83
   */
83
   */
84
  boolean mHasAutomatedUnitTests = false;
84
  boolean mHasAutomatedUnitTests = false;
Line 107... Line 107...
107
  int mBuildFile = 0;
107
  int mBuildFile = 0;
108
 
108
 
109
  /**build dependencies by package
109
  /**build dependencies by package
110
   * @attribute
110
   * @attribute
111
   */
111
   */
112
  Vector mPackageDependencyCollection = new Vector();
112
  Vector<Package> mPackageDependencyCollection = new Vector<Package>();
113
 
113
 
114
  /**used for escrow build purposes
114
  /**used for escrow build purposes
115
   * set true when a package has been processed
115
   * set true when a package has been processed
116
   * @attribute
116
   * @attribute
117
   */
117
   */
Line 129... Line 129...
129
  boolean mIndirectlyPlanned = false;
129
  boolean mIndirectlyPlanned = false;
130
 
130
 
131
  /**build dependencies by pv_id (-1 or not used for planned dependencies)
131
  /**build dependencies by pv_id (-1 or not used for planned dependencies)
132
   * @attribute
132
   * @attribute
133
   */
133
   */
134
  Vector mDependencyIDCollection = new Vector();
134
  Vector<Integer> mDependencyIDCollection = new Vector<Integer>();
135
 
135
 
136
  /**unique pkg_id in the database
136
  /**unique pkg_id in the database
137
   * used for querying package version existence in the database in daemon mode
137
   * used for querying package version existence in the database in daemon mode
138
   * @attribute
138
   * @attribute
139
   */
139
   */
Line 261... Line 261...
261
   */
261
   */
262
  boolean isWin32Built()
262
  boolean isWin32Built()
263
  {
263
  {
264
    mLogger.debug("isWin32Built on Package " + mName);
264
    mLogger.debug("isWin32Built on Package " + mName);
265
    boolean retVal = false;
265
    boolean retVal = false;
266
    for (Iterator it = mBuildStandardCollection.iterator(); it.hasNext(); )
266
    for (Iterator<BuildStandard> it = mBuildStandardCollection.iterator(); it.hasNext(); )
267
    {
267
    {
268
      BuildStandard buildStandard = (BuildStandard) it.next();
268
      BuildStandard buildStandard = it.next();
269
 
269
 
270
      if (buildStandard.getWin32() || buildStandard.getGeneric())
270
      if (buildStandard.getWin32() || buildStandard.getGeneric())
271
      {
271
      {
272
        retVal = true;
272
        retVal = true;
273
        break;
273
        break;
Line 282... Line 282...
282
   */
282
   */
283
  boolean isSolarisBuilt()
283
  boolean isSolarisBuilt()
284
  {
284
  {
285
    mLogger.debug("isSolarisBuilt on Package " + mName);
285
    mLogger.debug("isSolarisBuilt on Package " + mName);
286
    boolean retVal = false;
286
    boolean retVal = false;
287
    for (Iterator it = mBuildStandardCollection.iterator(); it.hasNext(); )
287
    for (Iterator<BuildStandard> it = mBuildStandardCollection.iterator(); it.hasNext(); )
288
    {
288
    {
289
      BuildStandard buildStandard = (BuildStandard) it.next();
289
      BuildStandard buildStandard = it.next();
290
 
290
 
291
      if (buildStandard.getSolaris() || buildStandard.getGeneric())
291
      if (buildStandard.getSolaris() || buildStandard.getGeneric())
292
      {
292
      {
293
        retVal = true;
293
        retVal = true;
294
        break;
294
        break;
Line 303... Line 303...
303
   */
303
   */
304
  boolean isLinuxBuilt()
304
  boolean isLinuxBuilt()
305
  {
305
  {
306
    mLogger.debug("isLinuxBuilt on Package " + mName);
306
    mLogger.debug("isLinuxBuilt on Package " + mName);
307
    boolean retVal = false;
307
    boolean retVal = false;
308
    for (Iterator it = mBuildStandardCollection.iterator(); it.hasNext(); )
308
    for (Iterator<BuildStandard> it = mBuildStandardCollection.iterator(); it.hasNext(); )
309
    {
309
    {
310
      BuildStandard buildStandard = (BuildStandard) it.next();
310
      BuildStandard buildStandard = it.next();
311
 
311
 
312
      if (buildStandard.getLinux() || buildStandard.getGeneric())
312
      if (buildStandard.getLinux() || buildStandard.getGeneric())
313
      {
313
      {
314
        retVal = true;
314
        retVal = true;
315
        break;
315
        break;
Line 324... Line 324...
324
   */
324
   */
325
  boolean isGeneric()
325
  boolean isGeneric()
326
  {
326
  {
327
    mLogger.debug("isGeneric on Package " + mName);
327
    mLogger.debug("isGeneric on Package " + mName);
328
    boolean retVal = false;
328
    boolean retVal = false;
329
    for (Iterator it = mBuildStandardCollection.iterator(); it.hasNext(); )
329
    for (Iterator<BuildStandard> it = mBuildStandardCollection.iterator(); it.hasNext(); )
330
    {
330
    {
331
      BuildStandard buildStandard = (BuildStandard) it.next();
331
      BuildStandard buildStandard = it.next();
332
 
332
 
333
      if (buildStandard.getGeneric())
333
      if (buildStandard.getGeneric())
334
      {
334
      {
335
        retVal = true;
335
        retVal = true;
336
        break;
336
        break;
Line 465... Line 465...
465
  private boolean exists(ReleaseManager releaseManager, int rtag_id) throws Exception
465
  private boolean exists(ReleaseManager releaseManager, int rtag_id) throws Exception
466
  {
466
  {
467
    mLogger.debug("exists 1 on Package " + mName + " version " + mVersion + " extension " + mExtension);
467
    mLogger.debug("exists 1 on Package " + mName + " version " + mVersion + " extension " + mExtension);
468
    boolean retVal = false;
468
    boolean retVal = false;
469
    
469
    
470
    if ( !releaseManager.mUseDatabase )
470
    if ( !ReleaseManager.mUseDatabase )
471
    {
471
    {
472
      mLogger.info("exists 1 !releaseManager.mUseDatabase");
472
      mLogger.info("exists 1 !releaseManager.mUseDatabase");
473
    }
473
    }
474
    else
474
    else
475
    {
475
    {
Line 542... Line 542...
542
   */
542
   */
543
  String emailInfo( String lf )
543
  String emailInfo( String lf )
544
  {
544
  {
545
    String retVal = new String();
545
    String retVal = new String();
546
    
546
    
547
    for (Iterator it = mBuildFailureEmailCollection.iterator(); it.hasNext(); )
547
    for (Iterator<String> it = mBuildFailureEmailCollection.iterator(); it.hasNext(); )
548
    {
548
    {
549
      String email = (String)it.next();
549
      String email = it.next();
550
      retVal +=
550
      retVal +=
551
      "  <owner email=\"" + email +"\"/>" + lf;
551
      "  <owner email=\"" + email +"\"/>" + lf;
552
    }
552
    }
553
    
553
    
554
    return retVal;
554
    return retVal;
555
  }
555
  }
556
 
556
 
-
 
557
  /**adds email to mBuildFailureEmailCollection if unique
-
 
558
   */
-
 
559
  void addEmail( String email )
-
 
560
  {
-
 
561
    boolean alreadyExists = false;
-
 
562
    
-
 
563
    for (Iterator<String> it = mBuildFailureEmailCollection.iterator(); it.hasNext(); )
-
 
564
    {
-
 
565
      String existingEmail = it.next();
-
 
566
      
-
 
567
      if ( existingEmail.compareTo(email) == 0 )
-
 
568
      {
-
 
569
        alreadyExists = true;
-
 
570
        break;
-
 
571
      }
-
 
572
    }
-
 
573
    
-
 
574
    if ( !alreadyExists )
-
 
575
    {
-
 
576
      mBuildFailureEmailCollection.add(email);
-
 
577
    }
-
 
578
  }
-
 
579
 
557
  /**entity class supporting the ERG version numbering standard:
580
  /**entity class supporting the ERG version numbering standard:
558
   * <major>.<minor>.<patch/build>
581
   * <major>.<minor>.<patch/build>
559
   * patch/build is at least a 4 digit number whose last 3 digits represent the build
582
   * patch/build is at least a 4 digit number whose last 3 digits represent the build
560
   */
583
   */
561
  public class VersionNumberingStandard
584
  public class VersionNumberingStandard