From: Eric Bavier <ericbavier@centurylink.net>
To: "Ludovic Courtès" <ludo@gnu.org>
Cc: 28765-done@debbugs.gnu.org
Subject: bug#28765: [PATCH] config: Conditionally configure daemon offload script.
Date: Tue, 10 Oct 2017 23:18:31 -0500 [thread overview]
Message-ID: <20171010231831.587b03db@centurylink.net> (raw)
In-Reply-To: <87sherm6id.fsf@gnu.org>
On Tue, 10 Oct 2017 16:17:46 +0200
ludo@gnu.org (Ludovic Courtès) wrote:
> Eric Bavier <ericbavier@centurylink.net> skribis:
>
> > On Tue, 10 Oct 2017 08:49:49 +0200
> > ludo@gnu.org (Ludovic Courtès) wrote:
> >
> >> Hello,
> >>
> >> Eric Bavier <ericbavier@centurylink.net> skribis:
> >>
> >> > On Mon, 09 Oct 2017 23:07:10 +0200
> >> > ludo@gnu.org (Ludovic Courtès) wrote:
> >> >
> >> >> Eric Bavier <bavier@cray.com> skribis:
> >> >>
> >> >> > From 984e324370c2c17d8d1a982adf2884112c9e64b7 Mon Sep 17 00:00:00 2001
> >> >> > From: Eric Bavier <bavier@cray.com>
> >> >> > Date: Mon, 9 Oct 2017 13:58:04 -0500
> >> >> > Subject: [PATCH] config: Conditionally configure daemon offload script.
> >> >> ^
> >> >> Nitpick: rather “build:”, which is for all things build-related.
> >> >>
> >> >> > * config-daemon.ac (nix/scripts/offload): Configure only if offloading enabled.
> >> >>
> >> >> It LGTM, but is it helpful? guix-daemon does not invoke ‘guix offload’
> >> >> when it’s missing, as can be seen in guix-daemon.cc:
> >> >>
> >> >> #ifdef HAVE_DAEMON_OFFLOAD_HOOK
> >> >> /* Use our build hook for distributed builds by default. */
> >> >> …
> >> >
> >> > 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="@abs_top_builddir@/nix/scripts" # for 'guix-authenticate'
> >> > export NIX_ROOT_FINDER NIX_SUBSTITUTERS NIX_LIBEXEC_DIR
> >> >
> >> > NIX_BUILD_HOOK="$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’s nicer (you’re welcome to push this change!), but it’s equivalent to
> >> what’s already here, no?
> >
> > It's not quite equivalent. The current situation would end up always
> > exporting NIX_BUILD_HOOK because it is always generated by
> > config.status.
>
> Oooh, got it.
>
> >> Is there a problem that we are trying to solve in the first place, or is
> >> it more about making things nicer?
> >
> > The problem is libstore/build.cc executing NIX_BUILD_HOOK even if the
> > daemon offload hook is disabled, i.e. when guile-ssh is missing.
> >
> > Make sense?
>
> Yes, definitely.
>
> Then you can definitely commit the pre-inst-env.in patch; the
> config-daemon.ac patch can’t hurt either.
pre-inst-env patch pushed as 7740228e3523e3e0e4c007eb1f1b224575d16574
prev parent reply other threads:[~2017-10-11 4:19 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-09 19:08 [bug#28765] [PATCH] config: Conditionally configure daemon offload script Eric Bavier
2017-10-09 21:07 ` Ludovic Courtès
2017-10-10 0:08 ` Eric Bavier
2017-10-10 6:49 ` Ludovic Courtès
2017-10-10 13:00 ` Eric Bavier
2017-10-10 14:17 ` Ludovic Courtès
2017-10-11 4:18 ` Eric Bavier [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20171010231831.587b03db@centurylink.net \
--to=ericbavier@centurylink.net \
--cc=28765-done@debbugs.gnu.org \
--cc=ludo@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).