From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?UTF-8?Q?Court=C3=A8s?=) Subject: bug#32184: =?UTF-8?Q?=E2=80=98guix?= pack =?UTF-8?Q?--bootstrap=E2=80=99?= is ineffective Date: Fri, 19 Oct 2018 18:43:14 +0200 Message-ID: <87va5xevkt.fsf@gnu.org> References: <87k1pu9pv3.fsf@gnu.org> <87r2k1ul77.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:42468) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gDXsZ-0006VQ-JK for bug-guix@gnu.org; Fri, 19 Oct 2018 12:44:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gDXsY-0006Dk-H7 for bug-guix@gnu.org; Fri, 19 Oct 2018 12:44:03 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:55445) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gDXsY-0006DJ-7w for bug-guix@gnu.org; Fri, 19 Oct 2018 12:44:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1gDXsY-0006EJ-2y for bug-guix@gnu.org; Fri, 19 Oct 2018 12:44:02 -0400 Sender: "Debbugs-submit" Resent-Message-ID: In-Reply-To: <87r2k1ul77.fsf@gmail.com> (Chris Marusich's message of "Tue, 17 Jul 2018 23:11:56 -0700") List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org Sender: "bug-Guix" To: Chris Marusich Cc: 32184@debbugs.gnu.org Hi Chris, Chris Marusich skribis: > ludo@gnu.org (Ludovic Court=C3=A8s) writes: > >> While preparing the 0.15 release I realized that =E2=80=98guix pack --bo= otstrap=E2=80=99 >> had become ineffective. Concretely, =E2=80=98tests/guix-pack.sh=E2=80= =99 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=E2=80=99t actually produce a =E2=80=98db.sqlite= =E2=80=99 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 =E2=80=98guix pack=E2=80=99 tests run using t= he user=E2=80=99s 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 tests. WDYT? At this point I think we can remove =E2=80=98--bootstrap=E2=80=99 from =E2= =80=98guix pack=E2=80=99 altogether. Thoughts? Thanks, Ludo=E2=80=99.