nix-collect-garbage: Don't call nix-env
Also, make sure --delete-older-than doesn't delete the current generation.
This commit is contained in:
parent
22b1a8d43f
commit
4ca5a9dcfd
4 changed files with 110 additions and 69 deletions
|
|
@ -30,11 +30,19 @@ typedef list<Generation> 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<unsigned int> & 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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue