PR feedback.
This commit is contained in:
parent
814ff75181
commit
2d8d854867
4 changed files with 4 additions and 8 deletions
|
@ -21,10 +21,6 @@ public static class Utilities
|
||||||
// TarFile doesn't properly handle hard links (https://github.com/dotnet/runtime/pull/85378#discussion_r1221817490),
|
// TarFile doesn't properly handle hard links (https://github.com/dotnet/runtime/pull/85378#discussion_r1221817490),
|
||||||
// use 'tar' instead.
|
// use 'tar' instead.
|
||||||
ExecuteHelper.ExecuteProcessValidateExitCode("tar", $"xzf {tarballPath} -C {outputDir}", outputHelper);
|
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)
|
public static void ExtractTarball(string tarballPath, string outputDir, string targetFilePath)
|
||||||
|
|
|
@ -20,7 +20,7 @@ namespace Microsoft.DotNet.Build.Tasks
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Replaces files that have the same content with hard links.
|
/// Replaces files that have the same content with hard links.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public sealed class RemoveDuplicateFiles : Task
|
public sealed class RemoveDuplicateFilesWithHardLinks : Task
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The path to the directory.
|
/// The path to the directory.
|
||||||
|
@ -32,7 +32,7 @@ namespace Microsoft.DotNet.Build.Tasks
|
||||||
{
|
{
|
||||||
if (OperatingSystem.IsWindows())
|
if (OperatingSystem.IsWindows())
|
||||||
{
|
{
|
||||||
Log.LogError($"{nameof(RemoveDuplicateFiles)} is not supported on Windows.");
|
Log.LogError($"{nameof(RemoveDuplicateFilesWithHardLinks)} is not supported on Windows.");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -40,6 +40,6 @@
|
||||||
<UsingTask TaskName="CollatePackageDownloads" AssemblyFile="$(CoreSdkTaskDll)"/>
|
<UsingTask TaskName="CollatePackageDownloads" AssemblyFile="$(CoreSdkTaskDll)"/>
|
||||||
<UsingTask TaskName="GenerateSdkRuntimeIdentifierChain" AssemblyFile="$(CoreSdkTaskDll)"/>
|
<UsingTask TaskName="GenerateSdkRuntimeIdentifierChain" AssemblyFile="$(CoreSdkTaskDll)"/>
|
||||||
<UsingTask TaskName="GetDependencyInfo" AssemblyFile="$(CoreSdkTaskDll)"/>
|
<UsingTask TaskName="GetDependencyInfo" AssemblyFile="$(CoreSdkTaskDll)"/>
|
||||||
<UsingTask TaskName="RemoveDuplicateFiles" AssemblyFile="$(CoreSdkTaskDll)"/>
|
<UsingTask TaskName="RemoveDuplicateFilesWithHardLinks" AssemblyFile="$(CoreSdkTaskDll)"/>
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
|
|
|
@ -568,7 +568,7 @@
|
||||||
and the corresponding shared frameworks are included in a distro package their data is shared instead of duplicated. -->
|
and the corresponding shared frameworks are included in a distro package their data is shared instead of duplicated. -->
|
||||||
<Target Name="ReplaceDuplicateFilesWithHardLinks" DependsOnTargets="LayoutBundledComponents"
|
<Target Name="ReplaceDuplicateFilesWithHardLinks" DependsOnTargets="LayoutBundledComponents"
|
||||||
Condition="'$(BundleRuntimePacks)' == 'true' and !$([MSBuild]::IsOSPlatform('WINDOWS'))">
|
Condition="'$(BundleRuntimePacks)' == 'true' and !$([MSBuild]::IsOSPlatform('WINDOWS'))">
|
||||||
<RemoveDuplicateFiles Directory="$(RedistLayoutPath)" />
|
<RemoveDuplicateFilesWithHardLinks Directory="$(RedistLayoutPath)" />
|
||||||
</Target>
|
</Target>
|
||||||
|
|
||||||
<Target Name="GenerateLayout"
|
<Target Name="GenerateLayout"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue