GNU bug report logs - #38612
Pass system and target arguments to gexp->file.

Previous Next

Package: guix-patches;

Reported by: Mathieu Othacehe <m.othacehe <at> gmail.com>

Date: Sat, 14 Dec 2019 21:02:01 UTC

Severity: normal

Done: Mathieu Othacehe <othacehe <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


Message #14 received at 38612 <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: Mathieu Othacehe <m.othacehe <at> gmail.com>
Cc: 38612 <at> debbugs.gnu.org
Subject: Re: [bug#38612] Pass system and target arguments to gexp->file.
Date: Fri, 20 Dec 2019 22:45:24 +0100
Mathieu Othacehe <m.othacehe <at> gmail.com> skribis:

> --- a/guix/profiles.scm
> +++ b/guix/profiles.scm
> @@ -1438,7 +1438,8 @@ MANIFEST."
>                               (locales? #t)
>                               (allow-collisions? #f)
>                               (relative-symlinks? #f)
> -                             system target)
> +                             (system (%current-system))
> +                             (target (%current-target-system)))
>    "Return a derivation that builds a profile (aka. 'user environment') with
>  the given MANIFEST.  The profile includes additional derivations returned by
>  the monadic procedures listed in HOOKS--such as an Info 'dir' file, etc.

AFAICS this change is unnecessary and even incorrect: the

  (mlet* %store-monad ((system (if system
                                   (return system)
                                   (current-system)))

trick ensures that we get the system that current at the time of the
monadic bind, whereas your change get the system and target that are
current at the time of the call.

It’s a terrible pitfall, I know…

Thanks,
Ludo’.




This bug report was last modified 4 years and 300 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.