[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#32184: ‘guix pack --bootstrap’ is ineffective

From: Ludovic Courtès
Subject: bug#32184: ‘guix pack --bootstrap’ is ineffective
Date: Fri, 19 Oct 2018 18:43:14 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux)

Hi Chris,

Chris Marusich <address@hidden> skribis:

> address@hidden (Ludovic Courtès) writes:
>> While preparing the 0.15 release I realized that ‘guix pack --bootstrap’
>> had become ineffective.  Concretely, ‘tests/guix-pack.sh’ would attempt
>> to build the world.
>> This is a consequence of c45477d2a1a651485feede20fe0f3d15aec48b39w, which
>> introduced a dependency on guile-sqlite3 in derivations that build
>> packs, even if they don’t actually produce a ‘db.sqlite’ file in there.


> Basically, we're manually doing dependency injection here depending on
> whether or not --bootstrap was given, right?  Instead of parameterizing
> the dependencies, what if we used a dependency injector (or "oracle", or
> "container", or whatever you want to call it) that, when invoked, would
> give us the dependency that is appropriate for the current context?
> Perhaps we could control the context via a single parameter.  For
> example, something like this:
>     (parameterize ((test-environment? #t))
>       (injector-get-dependency guile))
> would return the bootstrap guile, but something like this:
>     (parameterize ((test-environment? #f))
>       (injector-get-dependency guile))
> would return the usual guile.  This isn't much different from using
> parameters like we're already doing, except that it might save us from
> having to remember multiple parameters, and it might make the code
> cleaner by hiding the dependency selection/construction logic behind the
> injector abstraction.
> What do you think of that idea?

It was sad to see these tests were not running so I decided to bite the
bullet.  :-)

In commit 19c924af4f3726688ca155a905ebf1cb9acdfca2, I went for a
different solution: now these ‘guix pack’ tests run using the user’s
store (normally /gnu/store) rather than the test store
($builddir/test-tmp), when possible.

This allows us to run these tests and possibly write other more complex


At this point I think we can remove ‘--bootstrap’ from ‘guix pack’



reply via email to

[Prev in Thread] Current Thread [Next in Thread]