1
1
Fork 0
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:
Wouter den Breejen 2007-06-13 16:18:42 +00:00
parent 184443d18d
commit df43c1e5b9
2 changed files with 15 additions and 7 deletions

View file

@ -1249,6 +1249,9 @@ vector<int> LocalStore::getStatePathsInterval(const PathSet & statePaths)
PathSet getStateReferencesClosure(const Path & drvpath)
{
PathSet empty;
//get all ...
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 ...
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)
{
string storePath = *i;
@ -1284,6 +1288,7 @@ PathSet getStateReferencesClosure_(const Path & drvpath, PathSet & paths)
//paths = mergePathSets(paths, rec); //merge
}
}
*/
txn.commit();
return paths;

View file

@ -318,7 +318,10 @@ void run(Strings args)
//store->updateAllStateDerivations();
//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;
/* test */