[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
03/07: daemon: Run 'guix perform-download' directly.
From: |
guix-commits |
Subject: |
03/07: daemon: Run 'guix perform-download' directly. |
Date: |
Sun, 8 Sep 2019 06:02:42 -0400 (EDT) |
civodul pushed a commit to branch master
in repository guix.
commit 9fcc35c51fd579b3bb7b4f61cba6973675c3922c
Author: Ludovic Courtès <address@hidden>
Date: Tue Sep 3 21:59:45 2019 +0200
daemon: Run 'guix perform-download' directly.
* nix/scripts/download.in: Remove.
* nix/local.mk (nodist_pkglibexec_SCRIPTS): Remove 'scripts/download'.
* config-daemon.ac: Don't output 'nix/scripts/download'.
* nix/libstore/builtins.cc (builtinDownload): Invoke 'guix
perform-download' directly.
---
config-daemon.ac | 2 --
nix/libstore/builtins.cc | 4 ++--
nix/local.mk | 3 +--
nix/scripts/download.in | 11 -----------
4 files changed, 3 insertions(+), 17 deletions(-)
diff --git a/config-daemon.ac b/config-daemon.ac
index 907457f..50227e3 100644
--- a/config-daemon.ac
+++ b/config-daemon.ac
@@ -148,8 +148,6 @@ if test "x$guix_build_daemon" = "xyes"; then
AC_SUBST([GUIX_TEST_ROOT])
GUIX_CHECK_LOCALSTATEDIR
- AC_CONFIG_FILES([nix/scripts/download],
- [chmod +x nix/scripts/download])
AC_CONFIG_FILES([nix/scripts/substitute],
[chmod +x nix/scripts/substitute])
AC_CONFIG_FILES([nix/scripts/offload],
diff --git a/nix/libstore/builtins.cc b/nix/libstore/builtins.cc
index f7c7d42..4111ac4 100644
--- a/nix/libstore/builtins.cc
+++ b/nix/libstore/builtins.cc
@@ -39,7 +39,7 @@ static void builtinDownload(const Derivation &drv,
const char *const argv[] =
{
- "download", drvPath.c_str(), output.c_str(), NULL
+ "guix", "perform-download", drvPath.c_str(), output.c_str(), NULL
};
/* Tell the script what the store file name is, so that
@@ -50,7 +50,7 @@ static void builtinDownload(const Derivation &drv,
/* Tell it about options such as "print-extended-build-trace". */
setenv("_NIX_OPTIONS", settings.pack().c_str(), 1);
- const string program = settings.nixLibexecDir + "/download";
+ const string program = settings.guixProgram;
execv(program.c_str(), (char *const *) argv);
throw SysError(format("failed to run download program '%1%'") % program);
diff --git a/nix/local.mk b/nix/local.mk
index cdcd9eb..c4c3920 100644
--- a/nix/local.mk
+++ b/nix/local.mk
@@ -155,8 +155,7 @@ noinst_HEADERS =
\
(write (get-string-all in) out)))))"
nodist_pkglibexec_SCRIPTS = \
- %D%/scripts/substitute \
- %D%/scripts/download
+ %D%/scripts/substitute
if BUILD_DAEMON_OFFLOAD
diff --git a/nix/scripts/download.in b/nix/scripts/download.in
deleted file mode 100644
index 4d7088a..0000000
--- a/nix/scripts/download.in
+++ /dev/null
@@ -1,11 +0,0 @@
-#!@SHELL@
-# A shorthand for "guix perform-download", for use by the daemon.
-
-if test "x$GUIX_UNINSTALLED" = "x"
-then
- prefix="@prefix@"
- exec_prefix="@exec_prefix@"
- exec "@bindir@/guix" perform-download "$@"
-else
- exec guix perform-download "$@"
-fi
- branch master updated (7fcc2f9 -> cc98b00), guix-commits, 2019/09/08
- 02/07: daemon: Run 'guix authenticate' directly., guix-commits, 2019/09/08
- 03/07: daemon: Run 'guix perform-download' directly.,
guix-commits <=
- 06/07: daemon: Remove 'NIX_LIBEXEC_DIR'., guix-commits, 2019/09/08
- 07/07: etc: Remove references to libexec/guix* from SELinux policy., guix-commits, 2019/09/08
- 04/07: daemon: Run 'guix offload' directly., guix-commits, 2019/09/08
- 05/07: daemon: Run 'guix substitute' directly and assume a single substituter., guix-commits, 2019/09/08
- 01/07: daemon: Invoke 'guix gc --list-busy' instead of 'list-runtime-roots'., guix-commits, 2019/09/08