From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43534) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e1i6b-0004tm-AZ for guix-patches@gnu.org; Mon, 09 Oct 2017 20:09:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e1i6Y-0001Xa-5i for guix-patches@gnu.org; Mon, 09 Oct 2017 20:09:05 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:50187) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1e1i6Y-0001XI-1I for guix-patches@gnu.org; Mon, 09 Oct 2017 20:09:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1e1i6X-0002Oe-Po for guix-patches@gnu.org; Mon, 09 Oct 2017 20:09:01 -0400 Subject: [bug#28765] [PATCH] config: Conditionally configure daemon offload script. Resent-Message-ID: Date: Mon, 9 Oct 2017 19:08:01 -0500 From: Eric Bavier Message-ID: <20171009190801.22685b19@centurylink.net> In-Reply-To: <87vajoowsh.fsf@gnu.org> References: <87vajoowsh.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 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: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: Eric Bavier , 28765@debbugs.gnu.org On Mon, 09 Oct 2017 23:07:10 +0200 ludo@gnu.org (Ludovic Court=C3=A8s) wrote: > Eric Bavier skribis: >=20 > > From 984e324370c2c17d8d1a982adf2884112c9e64b7 Mon Sep 17 00:00:00 2001 > > From: Eric Bavier > > Date: Mon, 9 Oct 2017 13:58:04 -0500 > > Subject: [PATCH] config: Conditionally configure daemon offload script.= =20 > ^ > Nitpick: rather =E2=80=9Cbuild:=E2=80=9D, which is for all things build-r= elated. >=20 > > * config-daemon.ac (nix/scripts/offload): Configure only if offloading = enabled. =20 >=20 > It LGTM, but is it helpful? guix-daemon does not invoke =E2=80=98guix of= fload=E2=80=99 > when it=E2=80=99s missing, as can be seen in guix-daemon.cc: >=20 > #ifdef HAVE_DAEMON_OFFLOAD_HOOK > /* Use our build hook for distributed builds by default. */ > =E2=80=A6 Or maybe something like this would be preferable, to avoid exporting NIX_BUILD_HOOK if Guix has been configured to disable the daemon offload hook? --- a/build-aux/pre-inst-env.in +++ b/build-aux/pre-inst-env.in @@ -50,13 +50,9 @@ NIX_LIBEXEC_DIR=3D"@abs_top_builddir@/nix/scripts" # for= 'guix-authenticate' export NIX_ROOT_FINDER NIX_SUBSTITUTERS NIX_LIBEXEC_DIR =20 NIX_BUILD_HOOK=3D"$abs_top_builddir/nix/scripts/offload" -if [ -x "$NIX_BUILD_HOOK" ] -then - export NIX_BUILD_HOOK -else - # No offloading support. - unset NIX_BUILD_HOOK -fi +@BUILD_DAEMON_OFFLOAD_TRUE@export NIX_BUILD_HOOK +@BUILD_DAEMON_OFFLOAD_FALSE@# No offloading support. +@BUILD_DAEMON_OFFLOAD_FALSE@unset NIX_BUILD_HOOK =20 # The 'guix-register' program. GUIX_REGISTER=3D"$abs_top_builddir/guix-register"