Subversion Repositories DevTools

Rev

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

Rev 898 Rev 900
Line 187... Line 187...
187
          if (dependency == ReleaseManager.NULL_PACKAGE)
187
          if (dependency == ReleaseManager.NULL_PACKAGE)
188
          {
188
          {
189
            mLogger.info("planRelease dependency is not in the baseline " + alias);
189
            mLogger.info("planRelease dependency is not in the baseline " + alias);
190
            // exclude all dependent packages
190
            // exclude all dependent packages
191
            // max 50 chars
191
            // max 50 chars
192
            rippleBuildExclude(p, p.mId, "Package build dependency not in the release", null);
192
            rippleBuildExclude(p, p.mId, "Package build dependency not in the release", null, null);
193
             
193
             
194
            // take the package out of the build
194
            // take the package out of the build
195
            p.mBuildFile = -4;
195
            p.mBuildFile = -4;
196
            mLogger.info("planRelease set mBuildFile to -4 for package " + p.mAlias );
196
            mLogger.info("planRelease set mBuildFile to -4 for package " + p.mAlias );
197
            break;
197
            break;
Line 212... Line 212...
212
          if (!p.isReproducible())
212
          if (!p.isReproducible())
213
          {
213
          {
214
            // for escrow build purposes, exclude all dependent package versions
214
            // for escrow build purposes, exclude all dependent package versions
215
            mLogger.info("planRelease package not reproducible " + p.mName);
215
            mLogger.info("planRelease package not reproducible " + p.mName);
216
            // max 50 chars
216
            // max 50 chars
217
            rippleBuildExclude(p, p.mId, "Package has no build environment", null);
217
            rippleBuildExclude(p, p.mId, "Package has no build environment", null, null);
218
  
218
  
219
            // package is not reproducible, discard
219
            // package is not reproducible, discard
220
            p.mBuildFile = -1;
220
            p.mBuildFile = -1;
221
            mLogger.info("planRelease set mBuildFile to -1 for package " + p.mAlias );
221
            mLogger.info("planRelease set mBuildFile to -1 for package " + p.mAlias );
222
          }
222
          }
Line 272... Line 272...
272
          if ( !reproduce )
272
          if ( !reproduce )
273
          {
273
          {
274
            // for escrow build purposes, exclude all dependent package versions
274
            // for escrow build purposes, exclude all dependent package versions
275
            mLogger.info("planRelease package not reproducible on the build platforms configured for this baseline " + p.mName);
275
            mLogger.info("planRelease package not reproducible on the build platforms configured for this baseline " + p.mName);
276
            // max 50 chars
276
            // max 50 chars
277
            rippleBuildExclude(p, p.mId, "Package not built for configured platforms", null);
277
            rippleBuildExclude(p, p.mId, "Package not built for configured platforms", null, null);
278
            
278
            
279
            // package is not reproducible on the build platforms configured for this baseline, discard
279
            // package is not reproducible on the build platforms configured for this baseline, discard
280
            p.mBuildFile = -2;
280
            p.mBuildFile = -2;
281
            mLogger.info("planRelease set mBuildFile to -2 for package " + p.mAlias );
281
            mLogger.info("planRelease set mBuildFile to -2 for package " + p.mAlias );
282
          }
282
          }
Line 292... Line 292...
292
          
292
          
293
          for (Iterator<Package> it1 = mPackageCollection.iterator(); it1.hasNext(); )
293
          for (Iterator<Package> it1 = mPackageCollection.iterator(); it1.hasNext(); )
294
          {
294
          {
295
            Package p = it1.next();
295
            Package p = it1.next();
296
            
296
            
297
            if ( be.compare(p.mId) )
-
 
298
            {
-
 
299
              if ( p.mBuildFile == 0 )
-
 
300
              {
-
 
301
                // exclude all dependent package versions
297
            // ensure only root cause build exclusions are excluded
302
                mLogger.info("planRelease do not ripple " + p.mName);
298
            // mBuildExclusionCollection is at this point based on
303
                // provide the root id and cause as recorded in the database
299
            // relevant (direct and indirect) excluded pv's in the database
304
                rippleBuildExclude(p, be, it);
300
            if ( be.compare(p.mId) && be.isARootCause() )
305
                
301
            {
306
                // package is not reproducible, discard
302
              // package is not reproducible, discard
-
 
303
              rippleBuildExclude( p, p.mId, null, it, be );
307
                p.mBuildFile = -3;
304
              p.mBuildFile = -3;
308
                mLogger.info("planRelease set mBuildFile to -3 for package " + p.mAlias );
305
              mLogger.info("planRelease set mBuildFile to -3 for package " + p.mAlias );
309
              }
-
 
310
              break;
306
              break;
311
            }
307
            }
312
          }
308
          }
313
        }
309
        }
314
        
310
        
Line 581... Line 577...
581
                int pvApplied = p.applyPV(mReleaseManager, mBaseline);
577
                int pvApplied = p.applyPV(mReleaseManager, mBaseline);
582
                
578
                
583
                if ( pvApplied == 1 )
579
                if ( pvApplied == 1 )
584
                {
580
                {
585
                  // max 50 chars
581
                  // max 50 chars
586
                  rippleBuildExclude(p, p.mId, "Package has non standard versioning", null);
582
                  rippleBuildExclude(p, p.mId, "Package has non standard versioning", null, null);
587
                }
583
                }
588
                else
584
                else
589
                if ( pvApplied == 2 )
585
                if ( pvApplied == 2 )
590
                {
586
                {
591
                  // max 50 chars
587
                  // max 50 chars
592
                  rippleBuildExclude(p, p.mId, "Package has reached ripple field limitations", null);
588
                  rippleBuildExclude(p, p.mId, "Package has reached ripple field limitations", null, null);
593
                }
589
                }
594
                else
590
                else
595
                {
591
                {
596
                  buildFile = 2;
592
                  buildFile = 2;
597
                }
593
                }
Line 893... Line 889...
893
    return retVal;
889
    return retVal;
894
  }
890
  }
895
 
891
 
896
  /**sets the mBuildFile to -5 for the package and all dependent packages
892
  /**sets the mBuildFile to -5 for the package and all dependent packages
897
   */
893
   */
898
  private void rippleBuildExclude(Package p, int root_pv_id, String root_cause, ListIterator<BuildExclusion> list )
894
  private void rippleBuildExclude(Package p, int root_pv_id, String root_cause, ListIterator<BuildExclusion> list, BuildExclusion be )
899
  {
895
  {
900
    mLogger.debug("rippleBuildExclude");
896
    mLogger.debug("rippleBuildExclude");
901
    if ( p.mBuildFile == 0 || p.mBuildFile == 1 )
897
    if ( p.mBuildFile == 0 || p.mBuildFile == 1 )
902
    {
898
    {
903
      p.mBuildFile = -5;
899
      p.mBuildFile = -5;
904
      mLogger.info("rippleBuildExclude set mBuildFile to -5 for package " + p.mAlias );
900
      mLogger.info("rippleBuildExclude set mBuildFile to -5 for package " + p.mAlias );
905
      
901
      
906
      // if found, process it, else add it (unprocessed)
-
 
907
      boolean found = false;
902
      if ( be != null )
908
      for (Iterator<BuildExclusion> it = mBuildExclusionCollection.iterator(); it.hasNext(); )
-
 
909
      {
903
      {
910
        BuildExclusion buildExclusion = it.next();
-
 
911
        
-
 
912
        if ( buildExclusion.compare(p.mId, root_pv_id, root_cause))
-
 
913
        {
-
 
914
          found = true;
-
 
915
          buildExclusion.process();
-
 
916
          break;
904
        be.process();
917
        }
-
 
918
      }
905
      }
919
      
906
      else
920
      if (!found)
-
 
921
      {
907
      {
922
        // process all occurrences for this package
908
        // if found, process it, else add it (unprocessed)
923
        // these will be superceded by a new build exclusion entry
909
        boolean found = false;
924
        for (Iterator<BuildExclusion> it = mBuildExclusionCollection.iterator(); it.hasNext(); )
910
        for (Iterator<BuildExclusion> it = mBuildExclusionCollection.iterator(); it.hasNext(); )
925
        {
911
        {
926
          BuildExclusion buildExclusion = it.next();
912
          BuildExclusion buildExclusion = it.next();
927
          
913
          
928
          if ( buildExclusion.compare(p.mId))
914
          if ( buildExclusion.compare(p.mId, root_pv_id, root_cause))
929
          {
915
          {
-
 
916
            found = true;
930
            buildExclusion.process();
917
            buildExclusion.process();
-
 
918
            break;
931
          }
919
          }
932
        }
920
        }
933
        
921
        
934
        BuildExclusion buildExclusion = new BuildExclusion(p.mId, root_pv_id, root_cause);
-
 
935
        
-
 
936
        if ( list == null )
-
 
937
        {
-
 
938
          mBuildExclusionCollection.add(buildExclusion);
-
 
939
        }
-
 
940
        else
-
 
941
        {
-
 
942
          // must use the ListIterator interface to add to the collection whilst iterating through it
-
 
943
          list.add(buildExclusion);
-
 
944
        }
-
 
945
      }
-
 
946
          
-
 
947
      for (Iterator<Package> it = mPackageCollection.iterator(); it.hasNext(); )
-
 
948
      {
-
 
949
        Package pkg = it.next();
-
 
950
        
-
 
951
        if ( pkg != p )
922
        if (!found)
952
        {
923
        {
-
 
924
          // process all occurrences for this package
-
 
925
          // these will be superceded by a new build exclusion entry
953
          for (Iterator<Package> it2 = pkg.mPackageDependencyCollection.iterator(); it2.hasNext(); )
926
          for (Iterator<BuildExclusion> it = mBuildExclusionCollection.iterator(); it.hasNext(); )
954
          {
927
          {
955
            Package dependency = it2.next();
928
            BuildExclusion buildExclusion = it.next();
956
            
929
            
957
            if ( dependency == p )
930
            if ( buildExclusion.compare(p.mId))
958
            {
931
            {
959
              rippleBuildExclude( pkg, root_pv_id, null, list );
-
 
960
              break;
932
              buildExclusion.process();
961
            }
933
            }
962
          }
934
          }
-
 
935
          
-
 
936
          BuildExclusion buildExclusion = new BuildExclusion(p.mId, root_pv_id, root_cause);
-
 
937
          
-
 
938
          if ( list == null )
-
 
939
          {
-
 
940
            mBuildExclusionCollection.add(buildExclusion);
-
 
941
          }
-
 
942
          else
-
 
943
          {
-
 
944
            // must use the ListIterator interface to add to the collection whilst iterating through it
-
 
945
            list.add(buildExclusion);
-
 
946
          }
963
        }
947
        }
964
      }
948
      }
965
    }
-
 
966
    mLogger.info("rippleBuildExclude set " + p.mName + " " + p.mBuildFile);
-
 
967
  }
-
 
968
 
949
 
969
  /**sets the mBuildFile to -5 for the package and all dependent packages
-
 
970
   */
-
 
971
  private void rippleBuildExclude(Package p, BuildExclusion buildExclusion, ListIterator<BuildExclusion> list )
-
 
972
  {
-
 
973
    mLogger.debug("rippleBuildExclude");
-
 
974
    if ( p.mBuildFile == 0 || p.mBuildFile == 1 )
-
 
975
    {
-
 
976
      p.mBuildFile = -5;
-
 
977
      mLogger.warn("rippleBuildExclude set mBuildFile to -5 for package " + p.mAlias );
-
 
978
      buildExclusion.process();
-
 
979
      
-
 
980
      for (Iterator<Package> it = mPackageCollection.iterator(); it.hasNext(); )
950
      for (Iterator<Package> it = mPackageCollection.iterator(); it.hasNext(); )
981
      {
951
      {
982
        Package pkg = it.next();
952
        Package pkg = it.next();
983
        
953
        
984
        if ( pkg != p )
954
        if ( pkg != p )
Line 987... Line 957...
987
          {
957
          {
988
            Package dependency = it2.next();
958
            Package dependency = it2.next();
989
            
959
            
990
            if ( dependency == p )
960
            if ( dependency == p )
991
            {
961
            {
992
              rippleBuildExclude( pkg, p.mId, null, list );
962
              rippleBuildExclude( pkg, root_pv_id, null, list, null );
993
              break;
963
              break;
994
            }
964
            }
995
          }
965
          }
996
        }
966
        }
997
      }
967
      }