Skip to content

Commit 2bdc89f

Browse files
[release/v7.6] Mirror .NET/runtime ICU version range in PowerShell (#26563)
1 parent 47927a2 commit 2bdc89f

File tree

1 file changed

+17
-2
lines changed

1 file changed

+17
-2
lines changed

tools/packaging/packaging.psm1

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2111,17 +2111,32 @@ function Get-PackageDependencies
21112111

21122112
# These should match those in the Dockerfiles, but exclude tools like Git, which, and curl
21132113
$Dependencies = @()
2114+
2115+
# ICU version range follows .NET runtime policy.
2116+
# See: https://github.com/dotnet/runtime/blob/3fe8518d51bbcaa179bbe275b2597fbe1b88bc5a/src/native/libs/System.Globalization.Native/pal_icushim.c#L235-L243
2117+
#
2118+
# Version range rationale:
2119+
# - The runtime supports ICU versions >= the version it was built against
2120+
# and <= that version + 30, to allow sufficient headroom for future releases.
2121+
# - ICU typically releases about twice per year, so +30 provides roughly
2122+
# 15 years of forward compatibility.
2123+
# - On some platforms, the minimum supported version may be lower
2124+
# than the build version and we know that older versions just works.
2125+
#
2126+
$MinICUVersion = 60 # runtime minimum supported
2127+
$BuildICUVersion = 76 # current build version
2128+
$MaxICUVersion = $BuildICUVersion + 30 # headroom
2129+
21142130
if ($Distribution -eq 'deb') {
21152131
$Dependencies = @(
21162132
"libc6",
21172133
"libgcc1",
21182134
"libgssapi-krb5-2",
21192135
"libstdc++6",
21202136
"zlib1g",
2121-
"libicu76|libicu74|libicu72|libicu71|libicu70|libicu69|libicu68|libicu67|libicu66|libicu65|libicu63|libicu60|libicu57|libicu55|libicu52",
2137+
(($MaxICUVersion..$MinICUVersion).ForEach{ "libicu$_" } -join '|'),
21222138
"libssl3|libssl1.1|libssl1.0.2|libssl1.0.0"
21232139
)
2124-
21252140
} elseif ($Distribution -eq 'rh') {
21262141
$Dependencies = @(
21272142
"openssl-libs",

0 commit comments

Comments
 (0)