mirror of
https://github.com/NixOS/nix.git
synced 2025-11-26 04:00:59 +01:00
* Re-enable `nix-store -q'.
This commit is contained in:
parent
89635e16ba
commit
4f83146459
1 changed files with 13 additions and 4 deletions
|
|
@ -147,7 +147,6 @@ static void opPrintFixedPath(Strings opFlags, Strings opArgs)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#if 0
|
|
||||||
/* Place in `paths' the set of paths that are required to `realise'
|
/* Place in `paths' the set of paths that are required to `realise'
|
||||||
the given store path, i.e., all paths necessary for valid
|
the given store path, i.e., all paths necessary for valid
|
||||||
deployment of the path. For a derivation, this is the union of
|
deployment of the path. For a derivation, this is the union of
|
||||||
|
|
@ -170,6 +169,8 @@ static void storePathRequisites(const Path & storePath,
|
||||||
computeFSClosure(storePath, paths);
|
computeFSClosure(storePath, paths);
|
||||||
|
|
||||||
if (includeOutputs) {
|
if (includeOutputs) {
|
||||||
|
assert(0);
|
||||||
|
#if 0
|
||||||
for (PathSet::iterator i = paths.begin();
|
for (PathSet::iterator i = paths.begin();
|
||||||
i != paths.end(); ++i)
|
i != paths.end(); ++i)
|
||||||
if (isDerivation(*i)) {
|
if (isDerivation(*i)) {
|
||||||
|
|
@ -179,6 +180,7 @@ static void storePathRequisites(const Path & storePath,
|
||||||
if (isValidPath(j->second.path))
|
if (isValidPath(j->second.path))
|
||||||
computeFSClosure(j->second.path, paths);
|
computeFSClosure(j->second.path, paths);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -188,7 +190,8 @@ static Path maybeUseOutput(const Path & storePath, bool useOutput, bool forceRea
|
||||||
if (forceRealise) realisePath(storePath);
|
if (forceRealise) realisePath(storePath);
|
||||||
if (useOutput && isDerivation(storePath)) {
|
if (useOutput && isDerivation(storePath)) {
|
||||||
Derivation drv = derivationFromPath(storePath);
|
Derivation drv = derivationFromPath(storePath);
|
||||||
return findOutput(drv, "out");
|
return findTrustedEqClassMember(
|
||||||
|
findOutputEqClass(drv, "out"), currentTrustId);
|
||||||
}
|
}
|
||||||
else return storePath;
|
else return storePath;
|
||||||
}
|
}
|
||||||
|
|
@ -318,7 +321,9 @@ static void opQuery(Strings opFlags, Strings opArgs)
|
||||||
*i = fixPath(*i);
|
*i = fixPath(*i);
|
||||||
if (forceRealise) realisePath(*i);
|
if (forceRealise) realisePath(*i);
|
||||||
Derivation drv = derivationFromPath(*i);
|
Derivation drv = derivationFromPath(*i);
|
||||||
cout << format("%1%\n") % findOutput(drv, "out");
|
cout << format("%1%\n") % findTrustedEqClassMember(
|
||||||
|
findOutputEqClass(drv, "out"),
|
||||||
|
currentTrustId);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
@ -343,6 +348,7 @@ static void opQuery(Strings opFlags, Strings opArgs)
|
||||||
}
|
}
|
||||||
|
|
||||||
case qDeriver:
|
case qDeriver:
|
||||||
|
#if 0
|
||||||
for (Strings::iterator i = opArgs.begin();
|
for (Strings::iterator i = opArgs.begin();
|
||||||
i != opArgs.end(); ++i)
|
i != opArgs.end(); ++i)
|
||||||
{
|
{
|
||||||
|
|
@ -350,6 +356,8 @@ static void opQuery(Strings opFlags, Strings opArgs)
|
||||||
cout << format("%1%\n") %
|
cout << format("%1%\n") %
|
||||||
(deriver == "" ? "unknown-deriver" : deriver);
|
(deriver == "" ? "unknown-deriver" : deriver);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
assert(0);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case qBinding:
|
case qBinding:
|
||||||
|
|
@ -398,7 +406,6 @@ static void opQuery(Strings opFlags, Strings opArgs)
|
||||||
abort();
|
abort();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
|
|
@ -615,8 +622,10 @@ void run(Strings args)
|
||||||
op = opAddFixed;
|
op = opAddFixed;
|
||||||
else if (arg == "--print-fixed-path")
|
else if (arg == "--print-fixed-path")
|
||||||
op = opPrintFixedPath;
|
op = opPrintFixedPath;
|
||||||
|
#endif
|
||||||
else if (arg == "--query" || arg == "-q")
|
else if (arg == "--query" || arg == "-q")
|
||||||
op = opQuery;
|
op = opQuery;
|
||||||
|
#if 0
|
||||||
else if (arg == "--register-substitutes")
|
else if (arg == "--register-substitutes")
|
||||||
op = opRegisterSubstitutes;
|
op = opRegisterSubstitutes;
|
||||||
else if (arg == "--clear-substitutes")
|
else if (arg == "--clear-substitutes")
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue