From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: Required packages Date: Mon, 04 Feb 2013 23:08:17 +0100 Message-ID: <87lib3pwa6.fsf@gnu.org> References: <201302041952.22425.andreas@enge.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([208.118.235.92]:49445) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U2UD7-0002Pr-9l for bug-guix@gnu.org; Mon, 04 Feb 2013 17:08:22 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1U2UD5-0000dM-Q7 for bug-guix@gnu.org; Mon, 04 Feb 2013 17:08:21 -0500 Received: from mail3-relais-sop.national.inria.fr ([192.134.164.104]:35909) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U2UD5-0000dF-Jo for bug-guix@gnu.org; Mon, 04 Feb 2013 17:08:19 -0500 In-Reply-To: <201302041952.22425.andreas@enge.fr> (Andreas Enge's message of "Mon, 4 Feb 2013 19:52:22 +0100") 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-bounces+gcggb-bug-guix=m.gmane.org@gnu.org To: Andreas Enge Cc: bug-guix@gnu.org Andreas Enge skribis: > A question related to my previous posting, but also of independent=20 > justification: Should we maybe implement somthing similar to the "depends= "=20 > field of Debian packages? What=E2=80=99s this? > For instance, programming with mpc also requires mpfr and gmp; in fact, t= he=20 > first few lines of mpc.h read > #include "gmp.h" > #include "mpfr.h" > > So it would make sense to automatically pull in gmp and mpfr when a user= =20 > installs mpc. As dicussed with Ludovic, this could be handled by the=20 > "propagated-inputs" field of the package definition. s/could/should/ :-) =E2=80=9CPropagated inputs=E2=80=9D was intended precisely for this use cas= e. I don=E2=80=99t know why I didn=E2=80=99t use it but it=E2=80=99s a mistake since it requir= es packages using MPC to know about MPC=E2=80=99s dependencies, and to hard-code them. > But it also would make sense to not use such an automatism. For instance,= =20 > thanks to libtool, the mpc shared library is perfectly usable without=20 > installing mpfr into the user profile, as libmpc.la contains a pointer to= =20 > the mpfr package: > dependency_libs=3D' /nix/store/l0999b93cw0by4hcv6z5ykzwz0gw358x- > mpfr-3.1.1/lib/libmpfr.la /nix/store/ydxa85j3i21ac74dv0vbc6cxjjqpsfsv- > gmp-5.1.0/lib/libgmp.la -lm' > So a user who only wants to use a library and not develop with it may not= =20 > be interested in getting all the dependent headers in the user profile. Yes, but mpfr.h and gmp.h still need to be in the user=E2=80=99s CPATH, whi= ch contains ~/.guix-profile/include. So putting them in the user=E2=80=99s pr= ofile seems unavoidable. I think you=E2=80=99re concerned about cluttering the user=E2=80=99s profil= e, right? One thing that could be done to mitigate =E2=80=9Ccluttering=E2=80=9D is to= distinguish between packages that were pulled as dependencies of what the user installed, from packages the user explicitly installed (like apt does.) WDYT? > An obvious approach would be to split into library and devel packages, as= =20 > does debian. But I do not think we should go this road, it is quite=20 > convenient to get all of mpc in only one package. Yeah, I think it depends on the package. The main criterion for determining whether to split in several outputs would be the size of the closure of applications that use them. Example: glibc is 37 MiB in total, plus 5 MiB for linux-libre-headers, but lib/ is only 20 MiB. So any application that uses glibc adds all that to its closure. GLib has 20 MiB of doc=E2=80=93good to avoid pulling that if all you want i= s to run PulseAudio. ;-) Libtool=E2=80=99s =E2=80=9Cbin=E2=80=9D output refers to the shell, which n= oticeably increases the size of its closure. Good to avoid that if all you want is libltdl.so (like Guile does.) But there are many more counterexamples, typically libraries of a few hundred KiBs in total for which splitting is an inconvenience that doesn=E2=80=99t provide any significant benefit. Thoughts? Ludo=E2=80=99.