mirror of
https://github.com/NixOS/nix.git
synced 2025-11-27 04:30:59 +01:00
Firefox can now be brought under state control, however, the symlink ~/.mozilla/firefox/ --> /nix/state/...../ can not (yet) be created automatically at build time since ~/ is set to /homeless-shelter/ ...
This commit is contained in:
parent
b6974f2ae6
commit
c0bd494865
11 changed files with 93 additions and 18 deletions
|
|
@ -1,6 +1,7 @@
|
|||
#include "references.hh"
|
||||
#include "hash.hh"
|
||||
#include "util.hh"
|
||||
#include "local-store.hh"
|
||||
|
||||
#include <cerrno>
|
||||
#include <map>
|
||||
|
|
@ -119,6 +120,11 @@ void checkPath(const string & path,
|
|||
|
||||
|
||||
PathSet scanForReferences(const string & path, const PathSet & paths)
|
||||
{
|
||||
return scanForReferencesTxn(noTxn, path, paths);
|
||||
}
|
||||
|
||||
PathSet scanForReferencesTxn(const Transaction & txn, const Path & path, const PathSet & paths)
|
||||
{
|
||||
std::map<string, Path> backMap;
|
||||
StringSet ids;
|
||||
|
|
@ -150,6 +156,14 @@ PathSet scanForReferences(const string & path, const PathSet & paths)
|
|||
found.insert(j->second);
|
||||
}
|
||||
|
||||
//Get the solid state dependencies, and also insert them
|
||||
PathSet solidStateDeps;
|
||||
querySolidStateReferencesTxn(txn, path, solidStateDeps);
|
||||
found.insert(solidStateDeps.begin(), solidStateDeps.end());
|
||||
|
||||
//TODO !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! we only scan the paths, if we scan for state references, this STORE path will show up !!!!!!!!!!!!!!
|
||||
//TODO Create a scanForReferencesState() funtion wrapper !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
|
||||
return found;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue