mirror of
https://github.com/NixOS/nix.git
synced 2025-11-26 04:00:59 +01:00
Before adjusting getStateReferencesClosure_
This commit is contained in:
parent
184443d18d
commit
df43c1e5b9
2 changed files with 15 additions and 7 deletions
|
|
@ -1249,6 +1249,9 @@ vector<int> LocalStore::getStatePathsInterval(const PathSet & statePaths)
|
||||||
PathSet getStateReferencesClosure(const Path & drvpath)
|
PathSet getStateReferencesClosure(const Path & drvpath)
|
||||||
{
|
{
|
||||||
PathSet empty;
|
PathSet empty;
|
||||||
|
|
||||||
|
//get all ...
|
||||||
|
|
||||||
return getStateReferencesClosure_(drvpath, empty);
|
return getStateReferencesClosure_(drvpath, empty);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1256,13 +1259,14 @@ PathSet getStateReferencesClosure_(const Path & drvpath, PathSet & paths)
|
||||||
{
|
{
|
||||||
Transaction txn(nixDB); //TODO should u do a transaction here? ... this might delay the process ...
|
Transaction txn(nixDB); //TODO should u do a transaction here? ... this might delay the process ...
|
||||||
|
|
||||||
Strings data;
|
Derivation drv = derivationFromPath(derivationPath);
|
||||||
|
|
||||||
TODODODODOD..........
|
for (DerivationOutputs::iterator i = drv.outputs.begin(); i != drv.outputs.end(); ++i)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
Paths referencesKeys;
|
/*
|
||||||
nixDB.queryStrings(txn, dbReferences, path, data);
|
|
||||||
for (Strings::iterator i = data.begin(); i != data.end(); ++i)
|
for (Strings::iterator i = data.begin(); i != data.end(); ++i)
|
||||||
{
|
{
|
||||||
string storePath = *i;
|
string storePath = *i;
|
||||||
|
|
@ -1284,6 +1288,7 @@ PathSet getStateReferencesClosure_(const Path & drvpath, PathSet & paths)
|
||||||
//paths = mergePathSets(paths, rec); //merge
|
//paths = mergePathSets(paths, rec); //merge
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
txn.commit();
|
txn.commit();
|
||||||
return paths;
|
return paths;
|
||||||
|
|
|
||||||
|
|
@ -318,7 +318,10 @@ void run(Strings args)
|
||||||
//store->updateAllStateDerivations();
|
//store->updateAllStateDerivations();
|
||||||
//return;
|
//return;
|
||||||
|
|
||||||
PathSet paths = store->getStateReferencesClosure("/nix/store/928dd2wl5cgqg10hzc3aj4rqaips6bdk-hellohardcodedstateworld-dep1-1.0.drv");
|
PathSet paths
|
||||||
|
storePathRequisites("", false, paths);
|
||||||
|
|
||||||
|
//PathSet paths = store->getStateReferencesClosure("/nix/store/928dd2wl5cgqg10hzc3aj4rqaips6bdk-hellohardcodedstateworld-dep1-1.0.drv");
|
||||||
return;
|
return;
|
||||||
|
|
||||||
/* test */
|
/* test */
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue