Subversion Repositories DevTools

Rev

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

Rev 924 Rev 1320
Line 312... Line 312...
312
    mExtension = v_ext;
312
    mExtension = v_ext;
313
    mAlias = alias;
313
    mAlias = alias;
314
    mTestBuildInstruction = testBuildInstruction;
314
    mTestBuildInstruction = testBuildInstruction;
315
    mTestBuildEmail = email;
315
    mTestBuildEmail = email;
316
    mTestBuildVcsTag = pkg_vcs_tag;
316
    mTestBuildVcsTag = pkg_vcs_tag;
-
 
317
 
317
  }
318
  }
318
  
319
  
319
/**constructor for unit test purposes
320
/**constructor for unit test purposes
320
  */
321
  */
321
  public Package(ReleaseManager rm, String version, int majorLimit, int minorLimit, int patchLimit, int buildNumberLimit)
322
  public Package(ReleaseManager rm, String version, int majorLimit, int minorLimit, int patchLimit, int buildNumberLimit)
Line 325... Line 326...
325
    mVersion = version;
326
    mVersion = version;
326
    mMajorLimit = majorLimit;
327
    mMajorLimit = majorLimit;
327
    mMinorLimit = minorLimit;
328
    mMinorLimit = minorLimit;
328
    mPatchLimit = patchLimit;
329
    mPatchLimit = patchLimit;
329
    mBuildLimit = buildNumberLimit;
330
    mBuildLimit = buildNumberLimit;
-
 
331
 
-
 
332
    if ( version.endsWith(".cots") )
-
 
333
    {
-
 
334
        mExtension = ".cots";
-
 
335
        mVersion = version.substring( 0, version.length() - 5 );
-
 
336
        mChangeType.setMajor(false);
-
 
337
        mChangeType.setMinor(false);
-
 
338
        mChangeType.setPatch(true);
-
 
339
        mRippleField.setBuild();
-
 
340
    }
-
 
341
 
330
    try
342
    try
331
    {
343
    {
332
      mId = applyPV( rm, 0 );
344
      mId = applyPV( rm, 0 );
333
    }
345
    }
334
    catch(Exception e)
346
    catch(Exception e)
Line 495... Line 507...
495
      minor.value = Integer.parseInt(field[1]);
507
      minor.value = Integer.parseInt(field[1]);
496
      patch.value = Integer.parseInt(field[2]);
508
      patch.value = Integer.parseInt(field[2]);
497
    }
509
    }
498
    else
510
    else
499
    {
511
    {
-
 
512
      //
-
 
513
      //    Can ripple a .cots package under very controlled conditions
-
 
514
      //    Its ends with a .patchBuild field
-
 
515
      //    Package is marked as riple via build number
-
 
516
      //    Chaneg type og Major and Minor are not allowed
-
 
517
      //
500
      if ( !mChangeType.mMajor &&
518
      if ( !mChangeType.mMajor &&
501
           !mChangeType.mMinor &&
519
           !mChangeType.mMinor &&
502
           !mChangeType.mPatch &&
-
 
503
           mRippleField.mBuild &&
520
           mRippleField.mBuild &&
504
           mExtension.compareTo(".cots") == 0 &&
521
           mExtension.compareTo(".cots") == 0 &&
505
           field.length > 0 )
522
           field.length > 0 )
506
      {
523
      {
507
        // DEVI 52782
524
        // DEVI 52782
508
        // allow and work with (ripple build) versions a.b.c.d....xxxx
525
        // allow and work with (ripple build) versions a.b.c.d....xxxx
509
        // where xxxx.length > 3
526
        // where xxxx.length > 3
510
        String patchStr = field[field.length - 1];
527
        String patchStr = field[field.length - 1];
511
        int patchLen = patchStr.length();
528
        int patchLen = patchStr.length();
512
        
529
 
513
        // check patchStr is the last (at least 4) digits
530
        // check patchStr is the last (at least 4) digits
514
        if ( patchLen > 3 && mVersion.substring( mVersion.length() - patchLen, mVersion.length() ).compareTo(patchStr) == 0 )
531
        if ( patchLen > 3 && mVersion.substring( mVersion.length() - patchLen, mVersion.length() ).compareTo(patchStr) == 0 )
515
        {
532
        {
516
          patch.value = Integer.parseInt(patchStr);
533
          patch.value = Integer.parseInt(patchStr);
517
          nonStandardCotsVersion = mVersion.substring(0, mVersion.length() - patchLen );
534
          nonStandardCotsVersion = mVersion.substring(0, mVersion.length() - patchLen );