diff options
author | John Ericson <John.Ericson@Obsidian.Systems> | 2021-09-30 22:36:50 +0000 |
---|---|---|
committer | John Ericson <John.Ericson@Obsidian.Systems> | 2021-09-30 22:41:53 +0000 |
commit | f4f3203aa7c2fc9225a8ae220db25593066fb397 (patch) | |
tree | 9063673af148e34069dd894a2fd6a2981b13ff26 /src/libstore/profiles.hh | |
parent | 1b6cf0d5f56e166a1cbbf38142375b7a92fc88f2 (diff) | |
parent | 6a8d6246f603a372d557ab026670ae42bad558b0 (diff) |
Merge remote-tracking branch 'upstream/master' into path-info
Diffstat (limited to 'src/libstore/profiles.hh')
-rw-r--r-- | src/libstore/profiles.hh | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/libstore/profiles.hh b/src/libstore/profiles.hh index be55a65d4..d100c970c 100644 --- a/src/libstore/profiles.hh +++ b/src/libstore/profiles.hh @@ -11,7 +11,7 @@ namespace nix { class StorePath; -typedef unsigned int GenerationNumber; +typedef uint64_t GenerationNumber; struct Generation { @@ -46,6 +46,13 @@ void deleteGenerationsOlderThan(const Path & profile, const string & timeSpec, b void switchLink(Path link, Path target); +/* Roll back a profile to the specified generation, or to the most + recent one older than the current. */ +void switchGeneration( + const Path & profile, + std::optional<GenerationNumber> dstGen, + bool dryRun); + /* Ensure exclusive access to a profile. Any command that modifies the profile first acquires this lock. */ void lockProfile(PathLocks & lock, const Path & profile); |