From mboxrd@z Thu Jan 1 00:00:00 1970 From: Chris Marusich Subject: Re: [PATCH] gnu: Add asunder. Date: Sat, 24 Dec 2016 18:03:45 -0800 Message-ID: <87mvfkn4se.fsf@gmail.com> References: <20161217092040.3112-1-cmmarusich@gmail.com> <20161217092040.3112-2-cmmarusich@gmail.com> <20161217185621.GC1726@jasmine> <878trd7gmz.fsf@gmail.com> <87d1gj12nb.fsf@gmail.com> <20161223163640.GA8463@jasmine> <87mvfmnkin.fsf@gmail.com> <20161224070741.GA22948@jocasta.intra> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:39396) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cKyAD-00078h-Kn for guix-devel@gnu.org; Sat, 24 Dec 2016 21:03:54 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cKyAC-0003t6-Hh for guix-devel@gnu.org; Sat, 24 Dec 2016 21:03:53 -0500 Received: from mail-pf0-x241.google.com ([2607:f8b0:400e:c00::241]:35124) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cKyAC-0003sq-Ar for guix-devel@gnu.org; Sat, 24 Dec 2016 21:03:52 -0500 Received: by mail-pf0-x241.google.com with SMTP id i88so15467727pfk.2 for ; Sat, 24 Dec 2016 18:03:50 -0800 (PST) In-Reply-To: <20161224070741.GA22948@jocasta.intra> (John Darrington's message of "Sat, 24 Dec 2016 08:07:41 +0100") 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" To: John Darrington Cc: guix-devel@gnu.org --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable John Darrington writes: > On Fri, Dec 23, 2016 at 06:11:44PM -0800, Chris Marusich wrote: > Leo Famulari writes: >=20=20=20=20=20=20 > > On Fri, Dec 23, 2016 at 12:16:24AM -0800, Chris Marusich wrote: > >> Hi Leo, > >>=20 > >> I've responded to the feedback from you, Hartmut, and John. How = does > >> the latest patch look? It's available here: > >>=20 > >> https://lists.gnu.org/archive/html/guix-devel/2016-12/msg00707.ht= ml > > > > Thanks for the reminder! I pushed as > > 426e6083ae9d4569005dab8edf948485e5979171. > > > > I think it would be useful to figure out if it's possible to avoid= the > > wrapper somehow, but I didn't look into this closely. >=20=20=20=20=20=20 > I'm sure we could avoid the wrapper by patching the source, but why > would that be better? The wrapper is a simple and robust solution, = and > in this case I can't see any drawbacks to using it. >=20=20=20=20=20=20 > For context, Asunder assumes that various tools will be made availab= le > via the PATH environment variable. It refuses to function in certain > cases when a tool that it needs can't be found in the PATH. I'm sur= e we > could patch this mechanism, but it seems simpler to just create a > wrapper that puts the directories containing the tools onto the PATH. >=20=20=20=20=20=20 > > FWIW, I think wrappers are bit of a nasty solution and should be avoided > if feasible. Sometimes however there is no reasonable way to avoid them. > It sounds as if this might be such as case. J' Why is the wrapper not good here? What would be a better solution? Here's why I think the wrapper produced by 'wrap-program' is a good solution in this case: * The wrapper script allows us to package the software without modifying its source. As previously explained, Asunder is currently written under the assumption that the tools it requires will be made available via the PATH environment variable. * The wrapper script guarantees "complete deployment" of Asunder (i.e., no missing dependencies). This is because the wrapper script contains references to the components in the store that provide the command-line tools that Asunder requires. * The wrapper script requires less work than patching Asunder. * The wrapper script is more robust than any patch we might attempt to apply to Asunder's source code. This is a good argument for using a wrapper script in this case. And I believe these points apply to any component, like Asunder, which is written under the assumption that tools will be made available via PATH. I also am willing to believe there are cases where the wrapper script is undesirable, but I don't think this is one of them. If there's a better way to package Asunder, I'm happy to do it. However, I haven't heard of any concrete alternatives, or any concrete explanations of why a wrapper is undesirable. Until then, I think using a wrapper like this to package components like Asunder is the best way. =2D-=20 Chris --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEy/WXVcvn5+/vGD+x3UCaFdgiRp0FAlhfKQEACgkQ3UCaFdgi Rp2G0hAAzOV1rBxdGIP/z4JRhZP3xNhs8HwFbDtuJ6Ck4Lr0EhNwqlmePU9Y2Fu0 0d3Mg9IyLAsRiazWdMikeWJXblKyX/HJ8ya2MuxJy3aosDjmrWQci0gCb/ZqB7V+ lt7PMRes19Hip2yFqvcGYicqpGen8lFE0vKfhNVtc6gpc58pF0yU0pyPOK3Qd750 lH9Wl6fBaE9xDrguRw66NOvJ0kXfrajaeyZqlza/5rAgaGoLu8RQPAOQL8RDVTy2 O4NIpEowkoR+BZGHTwOcAE3wL8v614NSQrPGlXfHHqYs7beI/HEY22K8zA9Rb7A8 OZKs2gqdo/uv0Z8vpb6XIb8y2WddRnvP/XQFc9NJuYZLGXVM6OZwlnD5jGnJENIw Yuy3pz1DAi1RuPuXhKqA/6ZboUG7HJxcFiQZetRsrO24TLhnJFysm6ug2wTkw7vr 2h04lYO51FeP7HW2Ika41thH8bW4/RDEFpBoU+4/esIdcejwEXuA0GhmBReW8eho SALSxomS6TzvWoUP15XWFx0XVXOcCv6xXP16eAAFkYXcQV4ae+nNGwtNZnNQYrEf Mu5yZyre3zb1oGvTl6GuTv9l5Dka3k3ZLiXNTTtYKYdq7m3iEPIV+JJtr/MaiAhw IfNb6z+EJYNE+xJ2Irkh0AKfvfeZIhDVX4ciRQjYsHcq/XKnObI= =VJp4 -----END PGP SIGNATURE----- --=-=-=--