mirror of
https://github.com/NixOS/nix
synced 2025-06-27 04:21:16 +02:00
* Operation `--delete-generations' to delete generations of a
profile. Arguments are either generation number, or `old' to delete all non-current generations. Typical use: $ nix-env --delete-generations old $ nix-collect-garbage * istringstream -> string2Int.
This commit is contained in:
parent
c16be6ac92
commit
dcc433de47
8 changed files with 100 additions and 33 deletions
|
@ -616,3 +616,11 @@ bool statusOk(int status)
|
|||
{
|
||||
return WIFEXITED(status) && WEXITSTATUS(status) == 0;
|
||||
}
|
||||
|
||||
|
||||
bool string2Int(const string & s, int & n)
|
||||
{
|
||||
istringstream str(s);
|
||||
str >> n;
|
||||
return str && str.eof();
|
||||
}
|
||||
|
|
|
@ -246,6 +246,10 @@ string statusToString(int status);
|
|||
bool statusOk(int status);
|
||||
|
||||
|
||||
/* Parse a string into an integer. */
|
||||
bool string2Int(const string & s, int & n);
|
||||
|
||||
|
||||
/* !!! HACK HACK HACK - this should be in shared.hh, but it's to
|
||||
facilitate a quick hack - will remove this eventually (famous last
|
||||
words). */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue