Compare commits

...

4 Commits

Author SHA1 Message Date
Eelco Dolstra
624e38aa43 Bump version 2022-05-31 18:30:17 +02:00
Eelco Dolstra
53555dfb39 Merge pull request #6597 from NixOS/backport-6582-to-2.9-maintenance
[Backport 2.9-maintenance] Fix a segfault in the git fetcher
2022-05-31 17:19:28 +02:00
Théophane Hufschmitt
bc47593455 Fix a segfault in the git fetcher
The git fetcher code used to dereference the (potentially empty) `ref`
input attribute. This was magically working, probably because the
compiler somehow outsmarted us, but is now blowing up with newer nixpkgs
versions.

Fix that by not trying to access this field while we don't know for sure
that it has been defined.

Fix #6554

(cherry picked from commit 027fd45230)
2022-05-31 15:18:58 +00:00
Eelco Dolstra
daa14b8910 Mark official release 2022-05-30 20:49:35 +02:00
4 changed files with 5 additions and 5 deletions

View File

@@ -1 +1 @@
2.9.0
2.9.1

View File

@@ -71,7 +71,6 @@
- [Hacking](contributing/hacking.md)
- [CLI guideline](contributing/cli-guideline.md)
- [Release Notes](release-notes/release-notes.md)
- [Release X.Y (202?-??-??)](release-notes/rl-next.md)
- [Release 2.9 (2022-05-30)](release-notes/rl-2.9.md)
- [Release 2.8 (2022-04-19)](release-notes/rl-2.8.md)
- [Release 2.7 (2022-03-07)](release-notes/rl-2.7.md)

View File

@@ -15,7 +15,7 @@
then ""
else "pre${builtins.substring 0 8 (self.lastModifiedDate or self.lastModified or "19700101")}_${self.shortRev or "dirty"}";
officialRelease = false;
officialRelease = true;
linux64BitSystems = [ "x86_64-linux" "aarch64-linux" ];
linuxSystems = linux64BitSystems ++ [ "i686-linux" ];

View File

@@ -449,11 +449,10 @@ struct GitInputScheme : InputScheme
}
}
const Attrs unlockedAttrs({
Attrs unlockedAttrs({
{"type", cacheType},
{"name", name},
{"url", actualUrl},
{"ref", *input.getRef()},
});
Path repoDir;
@@ -466,6 +465,7 @@ struct GitInputScheme : InputScheme
head = "master";
}
input.attrs.insert_or_assign("ref", *head);
unlockedAttrs.insert_or_assign("ref", *head);
}
if (!input.getRev())
@@ -482,6 +482,7 @@ struct GitInputScheme : InputScheme
head = "master";
}
input.attrs.insert_or_assign("ref", *head);
unlockedAttrs.insert_or_assign("ref", *head);
}
if (auto res = getCache()->lookup(store, unlockedAttrs)) {