Skip to content

Commit

Permalink
dotnet: add patch to fix fetch-deps in dotnet 9 VMR
Browse files Browse the repository at this point in the history
  • Loading branch information
corngood committed Sep 23, 2024
1 parent 381a4b0 commit fdf86e9
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
From 93137ea040472f4042dd186427699ad249e7251b Mon Sep 17 00:00:00 2001
From: David McFarland <corngood@gmail.com>
Date: Sun, 22 Sep 2024 16:41:07 -0300
Subject: [PATCH] UpdateNuGetConfigPackageSourcesMappings: don't add empty
mappings

---
.../UpdateNuGetConfigPackageSourcesMappings.cs | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/eng/tools/tasks/Microsoft.DotNet.UnifiedBuild.Tasks/UpdateNuGetConfigPackageSourcesMappings.cs b/eng/tools/tasks/Microsoft.DotNet.UnifiedBuild.Tasks/UpdateNuGetConfigPackageSourcesMappings.cs
index 3b188c1801..9b7050ef46 100644
--- a/eng/tools/tasks/Microsoft.DotNet.UnifiedBuild.Tasks/UpdateNuGetConfigPackageSourcesMappings.cs
+++ b/eng/tools/tasks/Microsoft.DotNet.UnifiedBuild.Tasks/UpdateNuGetConfigPackageSourcesMappings.cs
@@ -115,7 +115,11 @@ namespace Microsoft.DotNet.UnifiedBuild.Tasks
// Skip sources with zero package patterns
if (allSourcesPackages[packageSource]?.Count > 0)
{
- pkgSrcMappingClearElement.AddAfterSelf(GetPackageMappingsElementForSource(packageSource));
+ var pkgSrc = GetPackageMappingsElementForSource(packageSource);
+ if (pkgSrc.Elements().Any())
+ {
+ pkgSrcMappingClearElement.AddAfterSelf(pkgSrc);
+ }
}
}

--
2.46.0

4 changes: 3 additions & 1 deletion pkgs/development/compilers/dotnet/vmr.nix
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,9 @@ stdenv.mkDerivation rec {
(global-name "com.apple.system.opendirectoryd.membership"))
'';

patches = lib.optionals (lib.versionOlder version "9") [
patches = lib.optionals (lib.versionAtLeast version "9") [
./UpdateNuGetConfigPackageSourcesMappings-don-t-add-em.patch
] ++ lib.optionals (lib.versionOlder version "9") [
./fix-aspnetcore-portable-build.patch
];

Expand Down

0 comments on commit fdf86e9

Please sign in to comment.