From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:470:142:3::10]:58919) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jHem1-0003zy-Po for guix-patches@gnu.org; Thu, 26 Mar 2020 22:31:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jHelz-0007I9-UK for guix-patches@gnu.org; Thu, 26 Mar 2020 22:31:05 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:54450) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jHely-0007HL-8k for guix-patches@gnu.org; Thu, 26 Mar 2020 22:31:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jHely-0003Am-5B for guix-patches@gnu.org; Thu, 26 Mar 2020 22:31:02 -0400 Subject: [bug#39807] [PATCH] guix: pack: Only wrap executable files. Resent-Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable Date: Thu, 26 Mar 2020 21:29:56 -0500 From: Eric Bavier In-Reply-To: <87d09pohrj.fsf@gnu.org> References: <20200227043604.13102-1-bavier@posteo.net> <87d09pohrj.fsf@gnu.org> Message-ID: <9e3d0e2f06b5d7994d35d10d687773ac@posteo.net> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: 39807@debbugs.gnu.org On 06.03.2020 05:16, Ludovic Court=C3=A8s wrote: > Hi, >=20 > Eric Bavier skribis: >=20 >> From: Eric Bavier >>=20 >> I feel like a test should be added to tests/guix-pack-relocatable.sh,=20 >> but >> I'm not sure how to do that while keeping the test lightweight. =20 >> Suggestions >> welcome. >=20 > Not sure how to do that. Since =E2=80=98guix pack=E2=80=99 accepts manif= ests, you=20 > could > have a manifest containing a =E2=80=98computed-file=E2=80=99 with a file = that shouldn=E2=80=99t > be wrapped, and then you could ensure that=E2=80=99s indeed the case. Or= you > could try with =E2=80=98git-minimal=E2=80=99 or some other package that e= xhibits the > problem? I almost have a working test using 'git-minimal', but I'm not happy with=20 the quantity of code needed to setup, and I'm worried now that that test=20 would be relying on an implementation detail that could change in the=20 future without us noticing (e.g. a git subcommand that's currently a=20 shell script is subsumed into git so the test no longer checks what we=20 want). So I think I'll try going the manifest/computed-file route instead. >=20 >> * guix/scripts/pack.scm (wrapped-package): Build wrappers for >> executable files and symlink others. >=20 > [...] >=20 >> - (for-each build-wrapper >> - (append (find-files (string-append input "/bin")) >> - (find-files (string-append input=20 >> "/sbin")) >> - (find-files (string-append input=20 >> "/libexec"))))))) >> + (receive (executables others) >=20 > I=E2=80=99d prefer srfi-11 =E2=80=98let-values=E2=80=99. :-) I tried let-values to begin with, but I found 'receive' to be much=20 easier on the eyes. For the case of binding values from a single=20 expression, does let-values offer benefits? And there are no other uses=20 of let-values in this module, so precedent/consistency doesn't seem to=20 have weight. > Otherwise LGTM, thanks! Thanks for review (and ping)! --=20 `~Eric