From 4ca5a9dcfd577487f8a5b192e8ec525c5baad8cb Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Thu, 21 May 2015 16:26:03 +0200 Subject: nix-collect-garbage: Don't call nix-env Also, make sure --delete-older-than doesn't delete the current generation. --- src/libstore/profiles.hh | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'src/libstore/profiles.hh') diff --git a/src/libstore/profiles.hh b/src/libstore/profiles.hh index 30d2376d99..e99bbf398a 100644 --- a/src/libstore/profiles.hh +++ b/src/libstore/profiles.hh @@ -30,11 +30,19 @@ typedef list Generations; /* Returns the list of currently present generations for the specified profile, sorted by generation number. */ Generations findGenerations(Path profile, int & curGen); - + Path createGeneration(Path profile, Path outPath); void deleteGeneration(const Path & profile, unsigned int gen); +void deleteGenerations(const Path & profile, const std::set & gensToDelete, bool dryRun); + +void deleteOldGenerations(const Path & profile, bool dryRun); + +void deleteGenerationsOlderThan(const Path & profile, time_t t, bool dryRun); + +void deleteGenerationsOlderThan(const Path & profile, const string & timeSpec, bool dryRun); + void switchLink(Path link, Path target); /* Ensure exclusive access to a profile. Any command that modifies -- cgit 1.4.1