Subversion Repositories DevTools

Rev

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

Rev 3865 Rev 3867
Line 61... Line 61...
61
	"    FROM PACKAGES pkg, package_versions pv"&_
61
	"    FROM PACKAGES pkg, package_versions pv"&_
62
	"   WHERE pkg.pkg_id = pv.pkg_id  AND  pkg.pkg_id = "& NNpkg_id
62
	"   WHERE pkg.pkg_id = pv.pkg_id  AND  pkg.pkg_id = "& NNpkg_id
63
End Function
63
End Function
64
 
64
 
65
'-------------------------------------------------------------------------------------------------------------
65
'-------------------------------------------------------------------------------------------------------------
66
'Returns TRUE if the specified version has a COTS extension
66
' Returns TRUE if the specified version has a COTS extension
-
 
67
' Really determines if the extension has to be strict Major.Minor.PatchBuild
67
'Also allow TOOLS extension as some of the build System tools are really COTS packages
68
' or is allowed to be more relaxes. As in COTS and TOOL packages.
-
 
69
'
-
 
70
' Read from the database to determine type
-
 
71
' If we cannot determine the project suffix then assume the worst
68
'
72
'
69
' Should be read from the database
-
 
70
Function HasCotsExtension(aversion)
73
Function HasCotsExtension(aversion)
-
 
74
   Dim rsQry, Query_String
-
 
75
   Dim reResult
-
 
76
   HasCotsExtension = FALSE
-
 
77
 
-
 
78
   ' Extract package suffix .xxxx
71
   Dim re: Set re = New RegExp
79
   Dim re: Set re = New RegExp
-
 
80
   re.IgnoreCase = true
72
   re.Pattern = "\.(tool)|(cots)$"
81
   re.Pattern = "(\.[a-z]{2,4})$"
73
   HasCotsExtension = re.Test(aversion)
82
   Set reResult = re.Execute(aversion)
-
 
83
   if reResult.Count = 1 Then
-
 
84
       Query_String = "SELECT EXT_NAME FROM PROJECT_EXTENTIONS pe WHERE " &_
-
 
85
                      "pe.IS_COTS='Y' AND pe.EXT_NAME='"&_
-
 
86
                       LCase(reResult.Item(0).Submatches(0)) & "'"
-
 
87
       Set rsQry = OraDatabase.DbCreateDynaset( Query_String, ORADYN_DEFAULT )
-
 
88
       If ((NOT rsQry.BOF) AND (NOT rsQry.EOF)) Then
-
 
89
           HasCotsExtension = TRUE
-
 
90
       End If
-
 
91
       rsQry.Close
-
 
92
   Else
-
 
93
       HasCotsExtension = TRUE
-
 
94
   end If
-
 
95
 
-
 
96
   Set rsQry = Nothing
74
   Set re = Nothing
97
   Set re = Nothing
-
 
98
   Set reResult = Nothing
75
End Function
99
End Function
76
 
100
 
77
'-------------------------------------------------------------------------------------------------------------
101
'-------------------------------------------------------------------------------------------------------------
78
'Returns TRUE if the specified version has a patch-build number.
102
'Returns TRUE if the specified version has a patch-build number.
79
Function HasPatchBuildNumber(aversion)
103
Function HasPatchBuildNumber(aversion)
Line 98... Line 122...
98
'-----------------------------------------------------------------------------------------------------------------------------
122
'-----------------------------------------------------------------------------------------------------------------------------
99
%>
123
%>
100
<%
124
<%
101
'===================== MAIN LINE ============================
125
'===================== MAIN LINE ============================
102
Call GetPackageInfo( parPv_id, objPkgInfo )
126
Call GetPackageInfo( parPv_id, objPkgInfo )
103
Dim bDisableAuto, bPatchOnly
127
Dim bDisableAuto, bPatchOnly, bIsCots
-
 
128
 
104
 
129
 
-
 
130
bIsCots = HasCotsExtension(objPkgInfo.Item("pkg_version"))
105
'Disable the "Auto" build option if the package is a COTS package and the version doesn't have a patch-build number.
131
'Disable the "Auto" build option if the package is a COTS package and the version doesn't have a patch-build number.
106
bDisableAuto = HasCotsExtension(objPkgInfo.Item("pkg_version")) and not HasPatchBuildNumber(objPkgInfo.Item("pkg_version"))
132
bDisableAuto = bIsCots and not HasPatchBuildNumber(objPkgInfo.Item("pkg_version"))
107
'Enable only the "Patch Change" option if the package is a COTS package and the version has a patch-build number.
133
'Enable only the "Patch Change" option if the package is a COTS package and the version has a patch-build number.
108
bPatchOnly = HasCotsExtension(objPkgInfo.Item("pkg_version")) and not HasWellFormedVersion(objPkgInfo.Item("pkg_version")) and HasPatchBuildNumber(objPkgInfo.Item("pkg_version"))
134
bPatchOnly = bIsCots and not HasWellFormedVersion(objPkgInfo.Item("pkg_version")) and HasPatchBuildNumber(objPkgInfo.Item("pkg_version"))
109
 
135
 
110
'if "Auto" build option is disabled then select the Manual option
136
'if "Auto" build option is disabled then select the Manual option
111
If bDisableAuto Then
137
If bDisableAuto Then
112
   parAuto = "0"
138
   parAuto = "0"
113
'else default to Auto
139
'else default to Auto