diff options
author | Eelco Dolstra <e.dolstra@tudelft.nl> | 2006-11-30T22·43+0000 |
---|---|---|
committer | Eelco Dolstra <e.dolstra@tudelft.nl> | 2006-11-30T22·43+0000 |
commit | 0565b5f2b35dc153dc98e1e3bd37476aa13ee4f1 (patch) | |
tree | a370db3e93b6e07f044fc436092c9d082da9c8be /src/nix-env | |
parent | aac547a8b3f481fda48cc1fe1082ce4c32be0e03 (diff) |
* More remote operations.
* Added new operation hasSubstitutes(), which is more efficient than querySubstitutes().size() > 0.
Diffstat (limited to 'src/nix-env')
-rw-r--r-- | src/nix-env/main.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/nix-env/main.cc b/src/nix-env/main.cc index ce0bef069708..a9f34387079b 100644 --- a/src/nix-env/main.cc +++ b/src/nix-env/main.cc @@ -832,18 +832,18 @@ static void opQuery(Globals & globals, XMLAttrs attrs; if (printStatus) { - Substitutes subs = store->querySubstitutes(i->queryOutPath(globals.state)); + bool hasSubs = store->hasSubstitutes(i->queryOutPath(globals.state)); bool isInstalled = installed.find(i->queryOutPath(globals.state)) != installed.end(); bool isValid = store->isValidPath(i->queryOutPath(globals.state)); if (xmlOutput) { attrs["installed"] = isInstalled ? "1" : "0"; attrs["valid"] = isValid ? "1" : "0"; - attrs["substitutable"] = !subs.empty() ? "1" : "0"; + attrs["substitutable"] = hasSubs ? "1" : "0"; } else columns.push_back( (string) (isInstalled ? "I" : "-") + (isValid ? "P" : "-") - + (!subs.empty() ? "S" : "-")); + + (hasSubs ? "S" : "-")); } if (xmlOutput) |