Skip to content

Commit e5aa4da

Browse files
Update the scope of dpkg failure suppressions (#48539)
1 parent 8f8e2ee commit e5aa4da

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

src/SourceBuild/content/test/Microsoft.DotNet.Installer.Tests/LinuxInstallerTests.cs

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -334,13 +334,20 @@ private string GenerateDockerfile(List<string> packageList, string baseImage, Pa
334334
sb.AppendLine("# Install the installer packages and Microsoft.DotNet.ScenarioTests.SdkTemplateTests tool");
335335
sb.Append("RUN");
336336

337-
// TODO: remove --force-all after deps image issue has been resolved - https://github.com/dotnet/dotnet-docker/issues/6271
338-
string packageInstallationCommand = packageType == PackageType.Deb ? "dpkg -i --force-all" : "rpm -i";
337+
string packageInstallationCommand = packageType == PackageType.Deb ? "dpkg -i" : "rpm -i";
339338
bool useAndOperator = false;
340339
foreach (string package in packageList)
341340
{
341+
string options = "";
342+
// TODO: remove --force-depends after deps image issue has been resolved - https://github.com/dotnet/dotnet-docker/issues/6271
343+
if (packageType == PackageType.Deb &&
344+
package.Contains("dotnet-runtime-deps-"))
345+
{
346+
options = " --force-depends";
347+
}
348+
342349
sb.AppendLine(" \\");
343-
sb.Append($" {(useAndOperator ? "&&" : "")} {packageInstallationCommand} {package}");
350+
sb.Append($" {(useAndOperator ? "&&" : "")} {packageInstallationCommand}{options} {package}");
344351
useAndOperator = true;
345352
}
346353
sb.AppendLine("");

0 commit comments

Comments
 (0)