aboutsummaryrefslogtreecommitdiff
path: root/nix/libstore/globals.cc
diff options
context:
space:
mode:
authorMark H Weaver <mhw@netris.org>2018-04-10 00:42:22 -0400
committerMark H Weaver <mhw@netris.org>2018-04-10 00:42:22 -0400
commitf89aa1521af69b0e1a1350c2380579788b0f8945 (patch)
tree5009cca687ac669ef846920877cbfb6fffdd9893 /nix/libstore/globals.cc
parent169c658f7f286efae397fa3eda55b1c56fa92a01 (diff)
parent60e1de6d95bd32b4996c199708541781b8f828fd (diff)
downloadpatches-f89aa1521af69b0e1a1350c2380579788b0f8945.tar
patches-f89aa1521af69b0e1a1350c2380579788b0f8945.tar.gz
Merge branch 'master' into core-updates
Diffstat (limited to 'nix/libstore/globals.cc')
-rw-r--r--nix/libstore/globals.cc44
1 files changed, 0 insertions, 44 deletions
diff --git a/nix/libstore/globals.cc b/nix/libstore/globals.cc
index 4ab6c3a0f9..fcafac2df6 100644
--- a/nix/libstore/globals.cc
+++ b/nix/libstore/globals.cc
@@ -78,39 +78,6 @@ void Settings::processEnvironment()
}
-void Settings::loadConfFile()
-{
- Path settingsFile = (format("%1%/%2%") % nixConfDir % "nix.conf").str();
- if (!pathExists(settingsFile)) return;
- string contents = readFile(settingsFile);
-
- unsigned int pos = 0;
-
- while (pos < contents.size()) {
- string line;
- while (pos < contents.size() && contents[pos] != '\n')
- line += contents[pos++];
- pos++;
-
- string::size_type hash = line.find('#');
- if (hash != string::npos)
- line = string(line, 0, hash);
-
- vector<string> tokens = tokenizeString<vector<string> >(line);
- if (tokens.empty()) continue;
-
- if (tokens.size() < 2 || tokens[1] != "=")
- throw Error(format("illegal configuration line `%1%' in `%2%'") % line % settingsFile);
-
- string name = tokens[0];
-
- vector<string>::iterator i = tokens.begin();
- advance(i, 2);
- settings[name] = concatStringsSep(" ", Strings(i, tokens.end())); // FIXME: slow
- };
-}
-
-
void Settings::set(const string & name, const string & value)
{
settings[name] = value;
@@ -256,17 +223,6 @@ string Settings::pack()
}
-void Settings::unpack(const string & pack) {
- Strings lines = tokenizeString<Strings>(pack, "\n");
- foreach (Strings::iterator, i, lines) {
- string::size_type eq = i->find('=');
- if (eq == string::npos)
- throw Error("illegal option name/value");
- set(i->substr(0, eq), i->substr(eq + 1));
- }
-}
-
-
Settings::SettingsMap Settings::getOverrides()
{
return overrides;