From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:470:142:3::10]:56301) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i5SWC-0005q5-Mx for guix-patches@gnu.org; Wed, 04 Sep 2019 06:28:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1i5SWB-00032A-H7 for guix-patches@gnu.org; Wed, 04 Sep 2019 06:28:04 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:52054) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1i5SWB-00031t-Al for guix-patches@gnu.org; Wed, 04 Sep 2019 06:28:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1i5SWB-00084L-74 for guix-patches@gnu.org; Wed, 04 Sep 2019 06:28:03 -0400 Subject: [bug#37302] [PATCH 3/7] daemon: Run 'guix perform-download' directly. Resent-Message-ID: From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Date: Wed, 4 Sep 2019 12:26:59 +0200 Message-Id: <20190904102703.19705-3-ludo@gnu.org> In-Reply-To: <20190904102703.19705-1-ludo@gnu.org> References: <20190904102703.19705-1-ludo@gnu.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: 37302@debbugs.gnu.org * 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(-) delete mode 100644 nix/scripts/download.in diff --git a/config-daemon.ac b/config-daemon.ac index 907457f478..50227e310c 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 f7c7d42484..4111ac4760 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 cdcd9eb1c2..c4c3920fa3 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 4d7088a993..0000000000 --- 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 -- 2.23.0