diff options
author | Ludovic Courtès <ludovic.courtes@inria.fr> | 2018-03-29 16:56:00 +0200 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2018-03-30 23:42:07 +0200 |
commit | c7589cce8d3f9fcb7769e424f341dba8fb3545d0 (patch) | |
tree | 157c37d5933152efc20e2aa268a573b0ddad1bdc /nix/libstore/globals.cc | |
parent | dffd077c59e0faf8200422572b7d3aab611f0348 (diff) | |
download | guix-c7589cce8d3f9fcb7769e424f341dba8fb3545d0.tar.gz |
daemon: Remove dead code.
* nix/libstore/globals.cc (Settings::loadConfFile, Settings::unpack): Remove. * nix/libstore/globals.hh: Adjust accordingly. * nix/libstore/misc.cc (queryMissing): Remove. * nix/libstore/misc.hh: Adjust accordingly. * nix/libstore/store-api.cc (followLinksToStore) (followLinksToStorePath, computeStorePathForHash): Remove. * nix/libstore/store-api.hh: Adjust accordingly.
Diffstat (limited to 'nix/libstore/globals.cc')
-rw-r--r-- | nix/libstore/globals.cc | 44 |
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; |