Subversion Repositories DevTools

Rev

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

Rev 1281 Rev 3621
Line 62... Line 62...
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
'Also allow TOOLS extension as some of the build System tools are really COTS packages
67
Function HasCotsExtension(aversion)
68
Function HasCotsExtension(aversion)
68
   Dim re: Set re = New RegExp
69
   Dim re: Set re = New RegExp
69
   re.Pattern = "\.cots$"
70
   re.Pattern = "\.(tool)|(cots)$"
70
   HasCotsExtension = re.Test(aversion)
71
   HasCotsExtension = re.Test(aversion)
71
   Set re = Nothing
72
   Set re = Nothing
72
End Function
73
End Function
73
 
74
 
74
'-------------------------------------------------------------------------------------------------------------
75
'-------------------------------------------------------------------------------------------------------------
Line 79... Line 80...
79
   re.Pattern = "\.\d{4,}\.[^\.]+$"
80
   re.Pattern = "\.\d{4,}\.[^\.]+$"
80
   HasPatchBuildNumber = re.Test(aversion)
81
   HasPatchBuildNumber = re.Test(aversion)
81
   Set re = Nothing      
82
   Set re = Nothing      
82
End Function
83
End Function
83
 
84
 
-
 
85
'-------------------------------------------------------------------------------------------------------------
-
 
86
'Returns TRUE if the specified version has a well formed version number
-
 
87
Function HasWellFormedVersion(aversion)
-
 
88
   'If a package has a major.minor.patch-build number then it is well formed
-
 
89
   Dim re: Set re = New RegExp
-
 
90
   re.Pattern = "^\d+\.\d+\.\d{4,}\.[^\.]+$"
-
 
91
   HasWellFormedVersion = re.Test(aversion)
-
 
92
   Set re = Nothing      
-
 
93
End Function
-
 
94
 
-
 
95
 
84
'-----------------------------------------------------------------------------------------------------------------------------
96
'-----------------------------------------------------------------------------------------------------------------------------
85
%>
97
%>
86
<%
98
<%
87
'===================== MAIN LINE ============================
99
'===================== MAIN LINE ============================
88
Call GetPackageInfo( parPv_id, objPkgInfo )
100
Call GetPackageInfo( parPv_id, objPkgInfo )
89
Dim bDisableAuto, bPatchOnly
101
Dim bDisableAuto, bPatchOnly
90
 
102
 
91
'Disable the "Auto" build option if the package is a COTS package and the version doesn't have a patch-build number.
103
'Disable the "Auto" build option if the package is a COTS package and the version doesn't have a patch-build number.
92
bDisableAuto = HasCotsExtension(objPkgInfo.Item("pkg_version")) and not HasPatchBuildNumber(objPkgInfo.Item("pkg_version"))
104
bDisableAuto = HasCotsExtension(objPkgInfo.Item("pkg_version")) and not HasPatchBuildNumber(objPkgInfo.Item("pkg_version"))
93
'Enable only the "Patch Change" option if the package is a COTS package and the version has a patch-build number.
105
'Enable only the "Patch Change" option if the package is a COTS package and the version has a patch-build number.
94
bPatchOnly = HasCotsExtension(objPkgInfo.Item("pkg_version")) and HasPatchBuildNumber(objPkgInfo.Item("pkg_version"))
106
bPatchOnly = HasCotsExtension(objPkgInfo.Item("pkg_version")) and not HasWellFormedVersion(objPkgInfo.Item("pkg_version")) and HasPatchBuildNumber(objPkgInfo.Item("pkg_version"))
95
 
107
 
96
'if "Auto" build option is disabled then select the Manual option
108
'if "Auto" build option is disabled then select the Manual option
97
If bDisableAuto Then
109
If bDisableAuto Then
98
   parAuto = "0"
110
   parAuto = "0"
99
'else default to Auto
111
'else default to Auto