profiles: Do not import the host's srfi-{19,26}.scm files.

Previously the "manual-database" derivation would always import the
host's srfi-{19,26}.scm files in the build side.  In practice this means
that different users could get different manual-database.drv depending
on the Guile version they're using in the host.

For example, the (gnu tests install) tests would fail if the host was
running Guile 2.2.3 because the guest is running 2.2.2, and thus has
different srfi-{19,26}.scm files.  The manual-database.drv would need to
be built from source, which would fail because prerequisites were
missing.

Reported by Mathieu Othacehe <m.othacehe@gmail.com>
at <https://debbugs.gnu.org/cgi/bugreport.cgi?bug=29409#96>.

* guix/profiles.scm (manual-database): Do not pass #:modules to
'gexp->derivation'.  Wrap 'build' gexp in 'with-imported-modules' form.
This commit is contained in:
Ludovic Courtès 2017-12-03 17:14:41 +01:00
parent d112e5a8c2
commit cdc938daf9
No known key found for this signature in database
GPG Key ID: 090B11993D9AEBB5
1 changed files with 62 additions and 64 deletions

View File

@ -1117,6 +1117,7 @@ the entries in MANIFEST."
(module-ref (resolve-interface '(gnu packages man)) 'man-db))
(define build
(with-imported-modules '((guix build utils))
#~(begin
(use-modules (guix build utils)
(srfi srfi-1)
@ -1187,12 +1188,9 @@ the entries in MANIFEST."
(+ (time-second duration)
(* (time-nanosecond duration) (expt 10 -9))))
(force-output)
(zero? exit-status))))
(zero? exit-status)))))
(gexp->derivation "manual-database" build
#:modules '((guix build utils)
(srfi srfi-19)
(srfi srfi-26))
#:local-build? #t))
(define %default-profile-hooks