From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: [PATCH] utils: Allow wrap-program to be called multiple times. Date: Sat, 13 Sep 2014 14:20:44 +0200 Message-ID: <877g17k8yr.fsf@gnu.org> References: <871trk2yis.fsf@member.fsf.org> <8738byti9p.fsf@gnu.org> <87sijw122v.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]:37553) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XSmJv-00009o-Nf for guix-devel@gnu.org; Sat, 13 Sep 2014 08:20:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XSmJq-0007FZ-1r for guix-devel@gnu.org; Sat, 13 Sep 2014 08:20:51 -0400 Received: from hera.aquilenet.fr ([2a01:474::1]:41386) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XSmJp-0007FU-Qy for guix-devel@gnu.org; Sat, 13 Sep 2014 08:20:45 -0400 In-Reply-To: <87sijw122v.fsf@gmail.com> (Eric Bavier's message of "Sat, 13 Sep 2014 01:12:08 -0500") List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: Eric Bavier Cc: guix-devel@gnu.org Eric Bavier skribis: > An updated patch is attached. I changed some of the wording in the > wrap-program docstring to bring it in a bit more in line with the new > behavior. Let me know if there should be any more adjustments there. I > also took the liberty of changing "/nix" to "/gnu". ;) Good. :-) >> It would be ideal if a test in tests/build-utils.scm made sure that >> =E2=80=98wrap-program=E2=80=99 uses the right file names when called mul= tiple times, >> but I won=E2=80=99t object if the patch doesn=E2=80=99t have it. > > See the new test included in this patch. Rather than checking for the > file outputs of wrap-program, it checks for correct behavior of the > wrapped program. I believe this is more consistent with how > wrap-program is used, and doesn't tie the test to the implementation. Right, good idea. > From 1b09db0a80d94d3a4c798cc6ee811891b34153e1 Mon Sep 17 00:00:00 2001 > From: Eric Bavier > Date: Sat, 13 Sep 2014 01:05:03 -0500 > Subject: [PATCH] utils: Allow wrap-program to be called multiple times. > > * guix/build/utils.scm (wrap-program): Multiple invocations of > wrap-program for the same file create successive wrappers. Adjust > docstring. > * tests/build-utils.scm: Test new wrap-program behavior. > (%store): New variable. Looks good to me. One last thing: > (define-module (test-build-utils) > + #:use-module (guix store) > + #:use-module (guix derivations) > #:use-module (guix build utils) > - #:use-module (srfi srfi-64)) > + #:use-module (guix packages) > + #:use-module (guix build-system) > + #:use-module (guix build-system trivial) > + #:use-module (gnu packages) > + #:use-module (gnu packages bootstrap) > + #:use-module (srfi srfi-34) > + #:use-module (srfi srfi-64) > + #:use-module (rnrs io ports) > + #:use-module (ice-9 popen)) >=20=20 > +(define %store > + (false-if-exception (open-connection))) > + > +(when %store > + ;; Make sure we build everything by ourselves. > + (set-build-options %store #:use-substitutes? #f)) These two forms can be replaced with: (define %store (open-connection-for-tests)) with the addition of #:use-module (guix tests). OK to commit with this change. Thank you! Ludo=E2=80=99.