From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60571) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e1oNe-0001TN-1H for guix-patches@gnu.org; Tue, 10 Oct 2017 02:51:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e1oNa-0006kI-0U for guix-patches@gnu.org; Tue, 10 Oct 2017 02:51:06 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:50335) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1e1oNZ-0006kA-Sv for guix-patches@gnu.org; Tue, 10 Oct 2017 02:51:01 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1e1oNZ-0004X3-JW for guix-patches@gnu.org; Tue, 10 Oct 2017 02:51:01 -0400 Subject: [bug#28765] [PATCH] config: Conditionally configure daemon offload script. Resent-Message-ID: From: ludo@gnu.org (Ludovic =?UTF-8?Q?Court=C3=A8s?=) References: <87vajoowsh.fsf@gnu.org> <20171009190801.22685b19@centurylink.net> Date: Tue, 10 Oct 2017 08:49:49 +0200 In-Reply-To: <20171009190801.22685b19@centurylink.net> (Eric Bavier's message of "Mon, 9 Oct 2017 19:08:01 -0500") Message-ID: <87zi8zpkdu.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: Eric Bavier Cc: Eric Bavier , 28765@debbugs.gnu.org Hello, Eric Bavier skribis: > 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=20 >> ^ >> Nitpick: rather =E2=80=9Cbuild:=E2=80=9D, which is for all things build-= related. >>=20 >> > * config-daemon.ac (nix/scripts/offload): Configure only if offloading= enabled.=20=20 >>=20 >> It LGTM, but is it helpful? guix-daemon does not invoke =E2=80=98guix o= ffload=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" # f= or 'guix-authenticate' > export NIX_ROOT_FINDER NIX_SUBSTITUTERS NIX_LIBEXEC_DIR >=20=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 It=E2=80=99s nicer (you=E2=80=99re welcome to push this change!), but it=E2= =80=99s equivalent to what=E2=80=99s already here, no? Is there a problem that we are trying to solve in the first place, or is it more about making things nicer? Thank you, Ludo=E2=80=99.