Subversion Repositories DevTools

Rev

Rev 5957 | Rev 6121 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 5957 Rev 5964
Line 530... Line 530...
530
          	  pkgInfoHash.Add "rtag_name", (rsTemp.Fields("rtag_name"))
530
          	  pkgInfoHash.Add "rtag_name", (rsTemp.Fields("rtag_name"))
531
          End If
531
          End If
532
 
532
 
533
          ' -- Determine if package is a member of this release
533
          ' -- Determine if package is a member of this release
534
          '    Mark as Not in Release
534
          '    Mark as Not in Release
535
          Query_String = "select pv_id from work_in_progress where rtag_id=:RTAG_ID and pv_id=:PV_ID" &_
535
          Query_String = "select pv_id, 0 as env_area from work_in_progress where rtag_id=:RTAG_ID and pv_id=:PV_ID" &_
536
                          " union" &_
536
                          " union" &_
537
                          " select pv_id from planned where rtag_id=:RTAG_ID and pv_id=:PV_ID" &_
537
                          " select pv_id, 1 as env_area from planned where rtag_id=:RTAG_ID and pv_id=:PV_ID" &_
538
                          " union" &_
538
                          " union" &_
539
                          " select pv_id from RELEASE_CONTENT where rtag_id=:RTAG_ID and pv_id=:PV_ID"
539
                          " select pv_id, 2 as env_area from RELEASE_CONTENT where rtag_id=:RTAG_ID and pv_id=:PV_ID"
540
          Set rsTemp = OraDatabase.DbCreateDynaset( Query_String, cint(0))
540
          Set rsTemp = OraDatabase.DbCreateDynaset( Query_String, cint(0))
541
          If rsTemp.RecordCount < 1 Then
541
          If rsTemp.RecordCount < 1 Then
542
               pkgInfoHash.Item ("notInRelease") = true
542
               pkgInfoHash.Item ("notInRelease") = true
543
               '
543
               '
544
               ' -- Determine related package that is in the release
544
               ' -- Determine related package that is in the release
Line 553... Line 553...
553
                   Set rsTemp = OraDatabase.DbCreateDynaset( Query_String, cint(0))
553
                   Set rsTemp = OraDatabase.DbCreateDynaset( Query_String, cint(0))
554
                   If rsTemp.RecordCount > 0 Then
554
                   If rsTemp.RecordCount > 0 Then
555
                    pkgInfoHash.Item ("pv_id_InRelease") = (rsTemp.Fields("pv_id"))
555
                    pkgInfoHash.Item ("pv_id_InRelease") = (rsTemp.Fields("pv_id"))
556
                   End If
556
                   End If
557
               End If
557
               End If
-
 
558
          Else
-
 
559
            If rsTemp("env_area") = 0 Then
-
 
560
                 pkgInfoHash.Item ("is_wip") = True
-
 
561
            End If
558
          End If
562
          End If
559
 
563
 
560
       End If
564
       End If
561
 
565
 
562
       If     (pkgInfoHash.Item ("dlocked") = "Y") _
566
       If     (pkgInfoHash.Item ("dlocked") = "Y") _
Line 602... Line 606...
602
 
606
 
603
   OraDatabase.Parameters.Remove "PV_ID"
607
   OraDatabase.Parameters.Remove "PV_ID"
604
   OraDatabase.Parameters.Remove "RTAG_ID"
608
   OraDatabase.Parameters.Remove "RTAG_ID"
605
   OraDatabase.Parameters.Remove "RETURN_NUMBER"
609
   OraDatabase.Parameters.Remove "RETURN_NUMBER"
606
 
610
 
607
 
-
 
608
   On Error Resume Next
611
   On Error Resume Next
-
 
612
 
609
   ' check if package is released
613
   ' check if package is released
610
   If (NNrtag = "") or (IsNull(NNrtag)) Then
614
   If NOT isaRelease Then
611
     pkgInfoHash.Add "is_released", False
615
     pkgInfoHash.Add "is_released", False
612
   Else
616
   Else
613
     Set rsTemp = OraDatabase.DbCreateDynaset( "SELECT rc.pv_id FROM release_content rc WHERE rc.rtag_id = " & NNrtag & " AND rc.pv_id = " & SSpv_id, cint(0))
617
     Set rsTemp = OraDatabase.DbCreateDynaset( "SELECT rc.pv_id FROM release_content rc WHERE rc.rtag_id = " & NNrtag & " AND rc.pv_id = " & SSpv_id, cint(0))
614
     pkgInfoHash.Add "is_released", rsTemp.RecordCount <> 0
618
     pkgInfoHash.Add "is_released", rsTemp.RecordCount <> 0
615
   End If
619
   End If
616
 
620
 
-
 
621
   ' check if package is excluded from build
617
   pkgInfoHash.Add "is_excluded", False
622
   pkgInfoHash.Add "is_excluded", False
618
   pkgInfoHash.Add "has_build_failure", False
623
   pkgInfoHash.Add "has_build_failure", False
619
 
-
 
620
   ' check if package is excluded from build
-
 
621
   If Not ((NNrtag = "") or (IsNull(NNrtag))) Then
624
   If isaRelease Then
622
     Set rsTemp = OraDatabase.DbCreateDynaset( "SELECT dnr.pv_id,dnr.root_file FROM do_not_ripple dnr WHERE dnr.rtag_id = " & NNrtag & " AND dnr.pv_id = " & SSpv_id, cint(0))
625
     Set rsTemp = OraDatabase.DbCreateDynaset( "SELECT dnr.pv_id,dnr.root_file FROM do_not_ripple dnr WHERE dnr.rtag_id = " & NNrtag & " AND dnr.pv_id = " & SSpv_id, cint(0))
623
     If rsTemp.RecordCount <> 0 Then
626
     If rsTemp.RecordCount <> 0 Then
624
       pkgInfoHash("is_excluded") = True
627
       pkgInfoHash("is_excluded") = True
625
       pkgInfoHash("has_build_failure") = Not IsNull(rsTemp("root_file"))
628
       pkgInfoHash("has_build_failure") = Not IsNull(rsTemp("root_file"))
626
     End If
629
     End If
627
   End If
630
   End If
628
 
631
 
-
 
632
   ' Check if Package is deprecated
-
 
633
   If isaRelease Then
-
 
634
     Set rsTemp = OraDatabase.DbCreateDynaset( "SELECT * FROM DEPRECATED_PACKAGES WHERE RTAG_ID ="& NNrtag &" AND "& EmptyToNullString("V_EXT", pkgInfoHash.Item ("v_ext")) &" AND PKG_ID = "& pkgInfoHash.Item ("pkg_id") &"", cint(0))
-
 
635
     If rsTemp.RecordCount > 0 Then
-
 
636
        pkgInfoHash.Add "is_deprecated", True
-
 
637
     End If
-
 
638
   End If
-
 
639
 
629
   rsTemp.Close
640
   rsTemp.Close
630
   Set rsTemp = nothing
641
   Set rsTemp = nothing
631
 
642
 
632
End Sub
643
End Sub
633
'-----------------------------------------------------------------------------------------------------------------------------
644
'-----------------------------------------------------------------------------------------------------------------------------
Line 1952... Line 1963...
1952
    Else
1963
    Else
1953
        EmptyToNull = NULL
1964
        EmptyToNull = NULL
1954
    End If
1965
    End If
1955
End Function
1966
End Function
1956
 
1967
 
-
 
1968
'-----------------------------------------------------------------------------------------------------------------------------
-
 
1969
Function EmptyToNullString ( sName, sVal)
-
 
1970
    If isNull(sVal) Then
-
 
1971
        EmptyToNullString = sName & " is NULL"
-
 
1972
    ElseIf sval <> "" Then
-
 
1973
        EmptyToNullString = sName & "='" & sVal & "'"
-
 
1974
    Else
-
 
1975
        EmptyToNullString = sName & " is NULL"
-
 
1976
    End If
-
 
1977
End Function
-
 
1978
 
1957
'--------------------------------------------------------------------------------------------------------------------------
1979
'--------------------------------------------------------------------------------------------------------------------------
1958
' Sets the state of all build daemons of the specified release
1980
' Sets the state of all build daemons of the specified release
1959
Sub SetDaemonStates (artag_id,astate)
1981
Sub SetDaemonStates (artag_id,astate)
1960
	On Error Resume Next
1982
	On Error Resume Next
1961
	OraDatabase.Parameters.Add "RTAG_ID", 			artag_id, 	ORAPARM_INPUT, ORATYPE_NUMBER 
1983
	OraDatabase.Parameters.Add "RTAG_ID", 			artag_id, 	ORAPARM_INPUT, ORATYPE_NUMBER