about summary refs log tree commit diff
path: root/third_party/nix/src
diff options
context:
space:
mode:
authorVincent Ambo <tazjin@google.com>2020-05-20T00·10+0100
committerVincent Ambo <tazjin@google.com>2020-05-20T00·10+0100
commitffb2ae54beb5796cd408fbe15d2d2da09ff37adf (patch)
treeef26eeb1526149b1569c6295fb3297469099bf7e /third_party/nix/src
parentddd059e0fa97662fe2c8340f44ffc753491ce9ef (diff)
chore(third_party/nix): Dump of minor accumulated changes r/780
None of these are worthy of a specific commit, or even have a real
reason behind them, but I didn't want to lose them.
Diffstat (limited to 'third_party/nix/src')
-rw-r--r--third_party/nix/src/build-remote/build-remote.cc2
-rw-r--r--third_party/nix/src/libmain/shared.cc6
-rw-r--r--third_party/nix/src/libstore/meson.build18
-rw-r--r--third_party/nix/src/nix-daemon/nix-daemon.cc1
4 files changed, 5 insertions, 22 deletions
diff --git a/third_party/nix/src/build-remote/build-remote.cc b/third_party/nix/src/build-remote/build-remote.cc
index ef139c6bdc11..fd32b5a63750 100644
--- a/third_party/nix/src/build-remote/build-remote.cc
+++ b/third_party/nix/src/build-remote/build-remote.cc
@@ -47,7 +47,7 @@ static bool allSupportedLocally(const std::set<std::string>& requiredFeatures) {
   return true;
 }
 
-static int _main(int argc, char** argv) {
+static int _main(int argc, char* argv[]) {
   {
     /* Ensure we don't get any SSH passphrase or host key popups. */
     unsetenv("DISPLAY");
diff --git a/third_party/nix/src/libmain/shared.cc b/third_party/nix/src/libmain/shared.cc
index 332bd5c4caee..f63fe9c11c5a 100644
--- a/third_party/nix/src/libmain/shared.cc
+++ b/third_party/nix/src/libmain/shared.cc
@@ -313,8 +313,8 @@ int handleExceptions(const string& programName, std::function<void()> fun) {
     return e.status;
   } catch (UsageError& e) {
     LOG(INFO) << e.what();
-    LOG(INFO) << "Try '"
-              << " --help' for more information." << programName;
+    LOG(INFO) << "Try '" << programName << " "
+              << " --help' for more information.";
     return 1;
   } catch (BaseError& e) {
     LOG(ERROR) << error << (settings.showTrace ? e.prefix() : "") << e.msg();
@@ -323,7 +323,7 @@ int handleExceptions(const string& programName, std::function<void()> fun) {
     }
     return e.status;
   } catch (std::bad_alloc& e) {
-    LOG(ERROR) << error << "out of memory";
+    LOG(ERROR) << error << "failed to allocate: " << e.what();
     return 1;
   } catch (std::exception& e) {
     LOG(ERROR) << error << e.what();
diff --git a/third_party/nix/src/libstore/meson.build b/third_party/nix/src/libstore/meson.build
index 700793bdea13..47f6ddf25970 100644
--- a/third_party/nix/src/libstore/meson.build
+++ b/third_party/nix/src/libstore/meson.build
@@ -1,12 +1,6 @@
 # Nix lib store build file
 #============================================================================
 
-
-
-
-# src files
-#============================================================================
-
 src_inc += include_directories('.')
 
 libstore_src = files(
@@ -96,9 +90,6 @@ if sys_name.contains('freebsd')
     libstore_dep_list += libdl_dep
 endif
 
-
-
-
 # Link args
 #============================================================================
 
@@ -107,9 +98,6 @@ libstore_link_list = [
 
 libstore_link_args = []
 
-
-
-
 # compiler args
 #============================================================================
 
@@ -126,9 +114,6 @@ libstore_cxx_args = [
     '-DSANDBOX_SHELL="@0@" '.format(get_option('sandbox_shell')),
     '-DLSOF="@0@" '.format(lsof)]
 
-
-
-
 # targets
 #============================================================================
 
@@ -144,9 +129,6 @@ libstore_src += custom_target(
   input : 'schema.sql',
   command : [bash, '-c', gen_header, 'sh', '@OUTPUT@'])
 
-
-
-
 # build
 #============================================================================
 
diff --git a/third_party/nix/src/nix-daemon/nix-daemon.cc b/third_party/nix/src/nix-daemon/nix-daemon.cc
index 0e5d7ac8baa6..e3ebb4767894 100644
--- a/third_party/nix/src/nix-daemon/nix-daemon.cc
+++ b/third_party/nix/src/nix-daemon/nix-daemon.cc
@@ -135,6 +135,7 @@ struct TunnelLogger {
   }
 
   void startActivity(const std::string& s) {
+    DLOG(INFO) << "startActivity(" << s << ")";
     if (GET_PROTOCOL_MINOR(clientVersion) < 20) {
       if (!s.empty()) {
         LOG(INFO) << s;