PR feedback.

This commit is contained in:
Tom Deseyn 2023-06-09 09:34:25 +02:00
parent 814ff75181
commit 2d8d854867
4 changed files with 4 additions and 8 deletions

View file

@ -21,10 +21,6 @@ public static class Utilities
// TarFile doesn't properly handle hard links (https://github.com/dotnet/runtime/pull/85378#discussion_r1221817490),
// use 'tar' instead.
ExecuteHelper.ExecuteProcessValidateExitCode("tar", $"xzf {tarballPath} -C {outputDir}", outputHelper);
// using FileStream fileStream = File.OpenRead(tarballPath);
// using GZipStream decompressorStream = new(fileStream, CompressionMode.Decompress);
// TarFile.ExtractToDirectory(decompressorStream, outputDir, true);
}
public static void ExtractTarball(string tarballPath, string outputDir, string targetFilePath)

View file

@ -20,7 +20,7 @@ namespace Microsoft.DotNet.Build.Tasks
/// <summary>
/// Replaces files that have the same content with hard links.
/// </summary>
public sealed class RemoveDuplicateFiles : Task
public sealed class RemoveDuplicateFilesWithHardLinks : Task
{
/// <summary>
/// The path to the directory.
@ -32,7 +32,7 @@ namespace Microsoft.DotNet.Build.Tasks
{
if (OperatingSystem.IsWindows())
{
Log.LogError($"{nameof(RemoveDuplicateFiles)} is not supported on Windows.");
Log.LogError($"{nameof(RemoveDuplicateFilesWithHardLinks)} is not supported on Windows.");
return false;
}

View file

@ -40,6 +40,6 @@
<UsingTask TaskName="CollatePackageDownloads" AssemblyFile="$(CoreSdkTaskDll)"/>
<UsingTask TaskName="GenerateSdkRuntimeIdentifierChain" AssemblyFile="$(CoreSdkTaskDll)"/>
<UsingTask TaskName="GetDependencyInfo" AssemblyFile="$(CoreSdkTaskDll)"/>
<UsingTask TaskName="RemoveDuplicateFiles" AssemblyFile="$(CoreSdkTaskDll)"/>
<UsingTask TaskName="RemoveDuplicateFilesWithHardLinks" AssemblyFile="$(CoreSdkTaskDll)"/>
</Project>

View file

@ -568,7 +568,7 @@
and the corresponding shared frameworks are included in a distro package their data is shared instead of duplicated. -->
<Target Name="ReplaceDuplicateFilesWithHardLinks" DependsOnTargets="LayoutBundledComponents"
Condition="'$(BundleRuntimePacks)' == 'true' and !$([MSBuild]::IsOSPlatform('WINDOWS'))">
<RemoveDuplicateFiles Directory="$(RedistLayoutPath)" />
<RemoveDuplicateFilesWithHardLinks Directory="$(RedistLayoutPath)" />
</Target>
<Target Name="GenerateLayout"