From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?UTF-8?Q?Court=C3=A8s?=) Subject: bug#32749: package-with-explicit-inputs leaks-in additional inputs Date: Tue, 18 Sep 2018 16:38:01 +0200 Message-ID: <87d0taj2gm.fsf@gnu.org> References: <87tvmo4f1d.fsf@gnu.org> <87musf6fas.fsf@gnu.org> <87y3bz3033.fsf@gnu.org> 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]:47533) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g2H9f-0007b7-0w for bug-guix@gnu.org; Tue, 18 Sep 2018 10:39:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1g2H9b-0001W4-0k for bug-guix@gnu.org; Tue, 18 Sep 2018 10:39:06 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:40310) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1g2H9a-0001VJ-Rw for bug-guix@gnu.org; Tue, 18 Sep 2018 10:39:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1g2H9a-0005bn-JX for bug-guix@gnu.org; Tue, 18 Sep 2018 10:39:02 -0400 Sender: "Debbugs-submit" Resent-Message-ID: In-Reply-To: <87y3bz3033.fsf@gnu.org> (Jan Nieuwenhuizen's message of "Tue, 18 Sep 2018 06:23:44 +0200") 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: Jan Nieuwenhuizen Cc: 32749@debbugs.gnu.org Hello, Jan Nieuwenhuizen skribis: > Ludovic Court=C3=A8s writes: > >> The difference comes from the fact that =E2=80=98gnu-make-explicit-input= s=E2=80=99 has >> Guile in its =E2=80=98inputs=E2=80=99: > > Ah, I missed that! > >> scheme@(gnu packages pawei)> (package-direct-inputs gnu-make-explicit-in= puts) >> $5 =3D (("libc" #) ("gcc" #) ("binutils" #) ("coreutils&co" #) ("bash" #) ("guile" #)) >> >> This comes from the fact that the =E2=80=98inputs=E2=80=99 field is not = overridden, >> unlike in the case of =E2=80=98gnu-make-no-implicit-inputs=E2=80=99. >> >> To solve this, the solution is to add this one =E2=80=98inputs=E2=80=99 = line: >> >> (define gnu-make-explicit-inputs >> (let ((p (package-with-explicit-inputs gnu-make >> (%bootstrap-inputs+toolchain) >> #:guile %bootstrap-guile))) >> (package-with-bootstrap-guile >> (package (inherit p) >> (name "make-explicit-inputs") >> (inputs '()) ;<- HERE >> (arguments (package-arguments p)))))) >> >> Perhaps you hit similar cases on =E2=80=98wip-bootstrap=E2=80=99? It=E2= =80=99s easy to leave >> out too many inputs=E2=80=A6 > > I tried this! The dependencies look OK, but the package won't build -- > there's no tar, make etc. Ah, true! > That can be fixed by repeating the explicit inputs, like this: > > (define gnu-make-explicit-inputs > (let ((p (package-with-explicit-inputs gnu-make > (%bootstrap-inputs+toolchain) > #:guile %bootstrap-guile))) > (package-with-bootstrap-guile > (package (inherit p) > (name "make-explicit-inputs") > (inputs (%bootstrap-inputs+toolchain)) > (native-inputs '()) > (arguments (package-arguments p)))))) > > ...but that looks a bit strange: if we have to mention the inputs a > second time the advantage over using the `gnu-make-no-implicit-inputs' > package description becomes real small? The key thing is that =E2=80=98package-with-explicit-inputs=E2=80=99 works = recursively: it adds (it does *not* replace) inputs to the whole package graph. > I also tried > > (inputs (package-inputs p)) > > but that pulls in gcc-bootstrap-0 again; which lead me to believe > `package-with-explicit-inputs' has no observable effect? Consider this: (define x (let ((p (package-with-explicit-inputs gnu-make (%bootstrap-inputs+toolchain) =E2=80=A6))) =E2=80=A6)) Here =E2=80=98%bootstrap-inputs+toolchain=E2=80=99 is called from the top l= evel, when =E2=80=98%current-system=E2=80=99 has its default value. So if you=E2=80= =99re on x86_64, you get the x86_64 inputs. So it=E2=80=99s not a bug per se, but it=E2=80=99s definitely an annoyance. I just realized that there=E2=80=99s already a fix for this, which is to pa= ss =E2=80=98package-with-explicit-inputs=E2=80=99 a procedure rather than the = input list, like this: (package-with-explicit-inputs gnu-make %bootstrap-inputs+toolchain =E2=80=A6) Does it work for you? Thanks, Ludo=E2=80=99.