mirror of
https://github.com/NixOS/nix
synced 2025-07-05 12:21:48 +02:00
* When computing the set of paths referenced by an expression, also
include the paths of the subterms.
This commit is contained in:
parent
9a99dc736d
commit
2b95a9dc05
4 changed files with 68 additions and 44 deletions
11
src/nix.cc
11
src/nix.cc
|
@ -96,7 +96,10 @@ static void opInstall(Strings opFlags, Strings opArgs)
|
|||
|
||||
for (Strings::iterator it = opArgs.begin();
|
||||
it != opArgs.end(); it++)
|
||||
realiseFState(termFromHash(argToHash(*it)));
|
||||
{
|
||||
StringSet paths;
|
||||
realiseFState(termFromHash(argToHash(*it)), paths);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -160,8 +163,10 @@ static void opQuery(Strings opFlags, Strings opArgs)
|
|||
break;
|
||||
|
||||
case qRefs: {
|
||||
Strings refs = fstateRefs(realiseFState(termFromHash(hash)));
|
||||
for (Strings::iterator j = refs.begin();
|
||||
StringSet refs;
|
||||
FState fs = ATmake("Include(<str>)", ((string) hash).c_str());
|
||||
fstateRefs(realiseFState(fs, refs), refs);
|
||||
for (StringSet::iterator j = refs.begin();
|
||||
j != refs.end(); j++)
|
||||
cout << format("%s\n") % *j;
|
||||
break;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue