diff --git a/src/libstore/local-store.cc b/src/libstore/local-store.cc index 790e6a848..fd4f0fffc 100644 --- a/src/libstore/local-store.cc +++ b/src/libstore/local-store.cc @@ -1249,6 +1249,9 @@ vector 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); + + for (DerivationOutputs::iterator i = drv.outputs.begin(); i != drv.outputs.end(); ++i) + { + + } - TODODODODOD.......... - - - 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; diff --git a/src/nix-state/nix-state.cc b/src/nix-state/nix-state.cc index 75e4b1ab2..3989f40a5 100644 --- a/src/nix-state/nix-state.cc +++ b/src/nix-state/nix-state.cc @@ -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 */