1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-11-27 12:41:00 +01:00

Fixed some more remote-store store bugs. Users can now add state store components with nix-env. Paths in /nix/state are now chowned and chmodded to their owners

This commit is contained in:
Wouter den Breejen 2007-08-30 18:20:20 +00:00
parent 627afcc1aa
commit 30cf65af26
24 changed files with 327 additions and 255 deletions

View file

@ -214,8 +214,8 @@ static void printTree(const Path & path,
//Lookup all references
PathSet references;
PathSet stateReferences;
store->queryReferences(path, references, -1);
store->queryStateReferences(path, stateReferences, -1);
store->queryReferences(path, references, 0);
store->queryStateReferences(path, stateReferences, 0);
PathSet allReferences = pathSets_union(references, stateReferences);
#if 0
@ -250,7 +250,7 @@ static void opQuery(Strings opFlags, Strings opArgs)
bool includeOutputs = false;
bool forceRealise = false;
string bindingName;
int revision = -1; //last revision
unsigned int revision = 0; //last revision
for (Strings::iterator i = opFlags.begin();
i != opFlags.end(); ++i)
@ -280,7 +280,7 @@ static void opQuery(Strings opFlags, Strings opArgs)
else if (*i == "--force-realise" || *i == "-f") forceRealise = true;
else if (*i == "--include-outputs") includeOutputs = true;
else if ((*i).substr(0,11) == "--revision="){
bool succeed = string2Int((*i).substr(11,(*i).length()), revision);
bool succeed = string2UnsignedInt((*i).substr(11,(*i).length()), revision);
if(!succeed)
throw UsageError("The given revision is not a valid number");
}