Subversion Repositories DevTools

Rev

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

Rev 6176 Rev 6184
Line 417... Line 417...
417
   Set rsTemp = nothing
417
   Set rsTemp = nothing
418
End Function
418
End Function
419
'-----------------------------------------------------------------------------------------------------------------------------
419
'-----------------------------------------------------------------------------------------------------------------------------
420
Sub Get_Pkg_Info ( SSpv_id, NNrtag )
420
Sub Get_Pkg_Info ( SSpv_id, NNrtag )
421
   Dim rsTemp, Query_String, isaRelease
421
   Dim rsTemp, Query_String, isaRelease
-
 
422
   Dim opCodeListString, opCodeList, opCodeStr
-
 
423
 
422
   isaRelease = NOT ((NNrtag = "") or (IsNull(NNrtag)))
424
   isaRelease = NOT ((NNrtag = "") or (IsNull(NNrtag)))
423
 
425
 
424
   OraDatabase.Parameters.Add "PV_ID",         SSpv_id,   ORAPARM_INPUT, ORATYPE_NUMBER
426
   OraDatabase.Parameters.Add "PV_ID",         SSpv_id,   ORAPARM_INPUT, ORATYPE_NUMBER
425
   OraDatabase.Parameters.Add "RTAG_ID",       NNrtag,    ORAPARM_INPUT, ORATYPE_NUMBER
427
   OraDatabase.Parameters.Add "RTAG_ID",       NNrtag,    ORAPARM_INPUT, ORATYPE_NUMBER
426
   OraDatabase.Parameters.Add "RETURN_NUMBER", NULL,      ORAPARM_OUTPUT, ORATYPE_NUMBER   
428
   OraDatabase.Parameters.Add "RETURN_NUMBER", NULL,      ORAPARM_OUTPUT, ORATYPE_NUMBER   
-
 
429
   OraDatabase.Parameters.Add "OP_CODE_LIST",  NULL,      ORAPARM_OUTPUT, ORATYPE_VARCHAR2
427
 
430
 
428
    pkgInfoHash.Add "isaRelease", isaRelease
431
    pkgInfoHash.Add "isaRelease", isaRelease
429
 
432
 
430
   '-- can_unofficial
433
   '-- can_unofficial
431
   '   Limits the ability to unrelease a package version
434
   '   Limits the ability to unrelease a package version
Line 518... Line 521...
518
          pkgInfoHash.Add "product_state_used", (rsTemp.Fields("product_state_used"))
521
          pkgInfoHash.Add "product_state_used", (rsTemp.Fields("product_state_used"))
519
          pkgInfoHash.Add "sdktag_id", (rsTemp.Fields("sdktag_id"))
522
          pkgInfoHash.Add "sdktag_id", (rsTemp.Fields("sdktag_id"))
520
          pkgInfoHash.Add "is_sdkpkg", (NOT IsNull(rsTemp.Fields("sdktag_id")))
523
          pkgInfoHash.Add "is_sdkpkg", (NOT IsNull(rsTemp.Fields("sdktag_id")))
521
          pkgInfoHash.Add "is_pegged", (rsTemp.Fields("pegged") <> 0)
524
          pkgInfoHash.Add "is_pegged", (rsTemp.Fields("pegged") <> 0)
522
 
525
 
-
 
526
          '
-
 
527
          ' Determine if there is a deamon instruction on this package in this release
-
 
528
          ' Also: OraDatabase.ExecuteSQL "BEGIN :OP_CODE_LIST := PK_BUILDAPI.daemon_ops_for_rtag("& nRtag_id & "); END;"
-
 
529
          objEH.TryORA ( OraSession )
-
 
530
          ON ERROR RESUME NEXT
-
 
531
          OraDatabase.ExecuteSQL "BEGIN :OP_CODE_LIST := PK_BUILDAPI.daemon_ops_for_rtag_pvid(:RTAG_ID,:PV_ID); END;"
-
 
532
          objEH.CatchORA ( OraSession )
-
 
533
          ON ERROR GOTO 0
-
 
534
 
-
 
535
          opCodeListString  = OraDatabase.Parameters("OP_CODE_LIST").Value
-
 
536
 
-
 
537
          If NOT IsNull(opCodeListString) AND opCodeListString <> "" Then
-
 
538
             opCodeList = Split(opCodeListString, ",")
-
 
539
             For Each opCodeStr In opCodeList
-
 
540
                If opCodeStr = OP_CODE_0_RIPPLE_BUILD_PACKAGE  Then
-
 
541
                    pkgInfoHash.Add "hasRippleInstr", 1
-
 
542
                End If
-
 
543
                If  opCodeStr = OP_CODE_1_TEST_BUILD_PACKAGE  Then
-
 
544
                    pkgInfoHash.Add "hasTestInstr", 1
-
 
545
                End If
-
 
546
             Next
-
 
547
          End If
-
 
548
 
523
       Else
549
       Else
524
          ' -- Package Version is not a member of the specified release
550
          ' -- Package Version is not a member of the specified release
525
          '    Get Basic Release and Project Details
551
          '    Get Basic Release and Project Details
526
          Query_String = " select pj.PROJ_ID, rt.RTAG_ID,rt.rtag_name " &_
552
          Query_String = " select pj.PROJ_ID, rt.RTAG_ID,rt.rtag_name " &_
527
                         " from projects pj, release_tags rt" &_
553
                         " from projects pj, release_tags rt" &_
Line 575... Line 601...
575
         AND  (pkgInfoHash.Item("can_edit_in_project") = "1" ) _
601
         AND  (pkgInfoHash.Item("can_edit_in_project") = "1" ) _
576
      Then
602
      Then
577
         pkgInfoHash.Item ("can_unofficial") = "true"
603
         pkgInfoHash.Item ("can_unofficial") = "true"
578
      End If
604
      End If
579
 
605
 
580
   Else
606
   Else     ' NOT isaRelease
581
      If pkgInfoHash.Exists ("modified_stamp") Then
607
      If pkgInfoHash.Exists ("modified_stamp") Then
582
          If NOT IsNull(pkgInfoHash.Item ("modified_stamp").Value) Then
608
          If NOT IsNull(pkgInfoHash.Item ("modified_stamp").Value) Then
583
              If (CDate( FormatDateTime(pkgInfoHash.Item ("modified_stamp"), 2) ) = Date) Then
609
              If (CDate( FormatDateTime(pkgInfoHash.Item ("modified_stamp"), 2) ) = Date) Then
584
                 ' Must be not older then a day
610
                 ' Must be not older then a day
585
                 If (pkgInfoHash.Item ("dlocked") = "A")  OR   NOT IsNull(pkgInfoHash.Item("is_patch")) Then
611
                 If (pkgInfoHash.Item ("dlocked") = "A")  OR   NOT IsNull(pkgInfoHash.Item("is_patch")) Then
586
                    pkgInfoHash.Item ("can_unofficial") = "true"
612
                    pkgInfoHash.Item ("can_unofficial") = "true"
587
                 End If
613
                 End If
588
              End If
614
              End If
589
          End If
615
          End If
590
     End If
616
     End If
591
   End If
617
   End If   ' End isaRelease
592
 
618
 
593
   '-- Get Patch Parent
619
   '-- Get Patch Parent
594
   If pkgInfoHash.Item ("is_patch") = "Y" Then
620
   If pkgInfoHash.Item ("is_patch") = "Y" Then
595
      Set rsTemp = OraDatabase.DbCreateDynaset( GetQuery("PatchParent.sql"), cint(0))
621
      Set rsTemp = OraDatabase.DbCreateDynaset( GetQuery("PatchParent.sql"), cint(0))
596
 
622
 
Line 611... Line 637...
611
   End If
637
   End If
612
 
638
 
613
   OraDatabase.Parameters.Remove "PV_ID"
639
   OraDatabase.Parameters.Remove "PV_ID"
614
   OraDatabase.Parameters.Remove "RTAG_ID"
640
   OraDatabase.Parameters.Remove "RTAG_ID"
615
   OraDatabase.Parameters.Remove "RETURN_NUMBER"
641
   OraDatabase.Parameters.Remove "RETURN_NUMBER"
616
 
-
 
-
 
642
   OraDatabase.Parameters.Remove "OP_CODE_LIST"
-
 
643
                
617
   On Error Resume Next
644
   On Error Resume Next
618
 
645
 
619
   ' check if package is released
646
   ' check if package is released
620
   If NOT isaRelease Then
647
   If NOT isaRelease Then
621
     pkgInfoHash.Add "is_released", False
648
     pkgInfoHash.Add "is_released", False