GNU bug report logs - #38100
'--with-input', '--with-git-url' etc. cause unnecessary rebuilds

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: guix; Severity: important; Reported by: Ludovic Courtès <ludovic.courtes@HIDDEN>; merged with #42156; dated Thu, 7 Nov 2019 12:36:02 UTC; Maintainer for guix is bug-guix@HIDDEN.
Changed bug title to ''--with-input', '--with-git-url' etc. cause unnecessary rebuilds' from '‘--with-input’ causes unintended rebuilds' Request was from Ludovic Courtès <ludo@HIDDEN> to control <at> debbugs.gnu.org. Full text available.
Severity set to 'important' from 'normal' Request was from Ludovic Courtès <ludo@HIDDEN> to control <at> debbugs.gnu.org. Full text available.
Merged 38100 42156. Request was from Ludovic Courtès <ludo@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

Message received at 38100 <at> debbugs.gnu.org:


Received: (at 38100) by debbugs.gnu.org; 8 Nov 2019 21:06:42 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Nov 08 16:06:42 2019
Received: from localhost ([127.0.0.1]:47782 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1iTBSs-0002sP-4V
	for submit <at> debbugs.gnu.org; Fri, 08 Nov 2019 16:06:42 -0500
Received: from eggs.gnu.org ([209.51.188.92]:46007)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ludo@HIDDEN>) id 1iTBSp-0002sB-UB
 for 38100 <at> debbugs.gnu.org; Fri, 08 Nov 2019 16:06:40 -0500
Received: from fencepost.gnu.org ([2001:470:142:3::e]:55842)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <ludo@HIDDEN>)
 id 1iTBSk-0000NP-Sn
 for 38100 <at> debbugs.gnu.org; Fri, 08 Nov 2019 16:06:34 -0500
Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=42390 helo=ribbon)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <ludo@HIDDEN>) id 1iTBSk-0004Di-73
 for 38100 <at> debbugs.gnu.org; Fri, 08 Nov 2019 16:06:34 -0500
From: =?utf-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN>
To: 38100 <at> debbugs.gnu.org
Subject: Re: bug#38100: =?utf-8?Q?=E2=80=98--with-input=E2=80=99?= causes
 unintended rebuilds
References: <87eeyjsw3g.fsf@HIDDEN>
Date: Fri, 08 Nov 2019 22:06:32 +0100
In-Reply-To: <87eeyjsw3g.fsf@HIDDEN> ("Ludovic
 \=\?utf-8\?Q\?Court\=C3\=A8s\=22\?\=
 \=\?utf-8\?Q\?'s\?\= message of "Thu, 07 Nov 2019 13:35:15 +0100")
Message-ID: <87ftiydqnb.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 38100
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Hi,

Ludovic Court=C3=A8s <ludovic.courtes@HIDDEN> skribis:

> Indeed, evaluating:
>
>   (bag-transitive-inputs
>    (package->bag ((package-input-rewriting '()) glib)))
>
> shows that we have two =E2=80=9Cpython=E2=80=9D packages there that are n=
ot =E2=80=98eq?=E2=80=99.

The problem is that =E2=80=98glib=E2=80=99 depends on =E2=80=98python-libxm=
l2=E2=80=99, which uses
=E2=80=98python-build-system=E2=80=99 and thus has =E2=80=98python=E2=80=99=
 as an implicit input.

=E2=80=98package-input-rewriting=E2=80=99 doesn=E2=80=99t touch implicit in=
puts so it leaves
that implicit =E2=80=98python=E2=80=99 untouched.

Since =E2=80=98transitive-inputs=E2=80=99 (used by =E2=80=98bag-transitive-=
inputs=E2=80=99) uses pointer
equality, we end up with two =E2=80=9Cpython=E2=80=9D packages that are not=
 =E2=80=98eq?=E2=80=99 but
are functionally equivalent: the one produced by
=E2=80=98package-input-rewriting=E2=80=99, and the implicit dependency of
=E2=80=98python-libxml2=E2=80=99.  QED.

(This is essentially the same as <https://bugs.gnu.org/30155>.)

I=E2=80=99m not sure how to address it.

Ludo=E2=80=99.




Information forwarded to bug-guix@HIDDEN:
bug#38100; Package guix. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 7 Nov 2019 12:35:24 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Nov 07 07:35:24 2019
Received: from localhost ([127.0.0.1]:41755 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1iSh0V-0008DH-PA
	for submit <at> debbugs.gnu.org; Thu, 07 Nov 2019 07:35:24 -0500
Received: from lists.gnu.org ([209.51.188.17]:37352)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ludovic.courtes@HIDDEN>) id 1iSh0U-0008DA-2A
 for submit <at> debbugs.gnu.org; Thu, 07 Nov 2019 07:35:22 -0500
Received: from eggs.gnu.org ([2001:470:142:3::10]:58439)
 by lists.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <ludovic.courtes@HIDDEN>) id 1iSh0S-0002de-Mn
 for bug-Guix@HIDDEN; Thu, 07 Nov 2019 07:35:21 -0500
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_50,RCVD_IN_DNSWL_HI,
 URIBL_BLOCKED autolearn=disabled version=3.3.2
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <ludovic.courtes@HIDDEN>) id 1iSh0R-0007cO-65
 for bug-Guix@HIDDEN; Thu, 07 Nov 2019 07:35:20 -0500
Received: from mail2-relais-roc.national.inria.fr ([192.134.164.83]:40976)
 by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)
 (Exim 4.71) (envelope-from <ludovic.courtes@HIDDEN>)
 id 1iSh0Q-0007aR-Ti
 for bug-Guix@HIDDEN; Thu, 07 Nov 2019 07:35:19 -0500
X-IronPort-AV: E=Sophos;i="5.68,278,1569276000"; d="scan'208";a="410796699"
Received: from unknown (HELO ribbon) ([193.50.110.140])
 by mail2-relais-roc.national.inria.fr with ESMTP/TLS/AES256-GCM-SHA384;
 07 Nov 2019 13:35:15 +0100
From: =?utf-8?Q?Ludovic_Court=C3=A8s?= <ludovic.courtes@HIDDEN>
To: bug-Guix@HIDDEN
Subject: =?utf-8?Q?=E2=80=98--with-input=E2=80=99?= causes unintended rebuilds
X-URL: http://www.fdn.fr/~lcourtes/
X-Revolutionary-Date: 17 Brumaire an 228 de la =?utf-8?Q?R=C3=A9volution?=
X-PGP-Key-ID: 0x090B11993D9AEBB5
X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc
X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4  0CFB 090B 1199 3D9A EBB5
X-OS: x86_64-pc-linux-gnu
Date: Thu, 07 Nov 2019 13:35:15 +0100
Message-ID: <87eeyjsw3g.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
 recognized.
X-Received-From: 192.134.164.83
X-Spam-Score: -1.3 (-)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.3 (--)

Hello,

Consider this example:

--8<---------------cut here---------------start------------->8---
$ guix build glib -nd
/gnu/store/9zz9hvzaz06f40a4cbvhskb183x676w4-glib-2.60.6.drv
$ guix build glib --with-input=3Dinkscape=3Dlibreoffice -nd
/gnu/store/15f9jkpakmsaz8i2a0gy4kir1zyk29vi-glib-2.60.6.drv
$ guix describe
Generacio 114	Nov 02 2019 11:32:51	(nuna)
  guix ab1c063
    repository URL: https://git.savannah.gnu.org/git/guix.git
    branch: master
    commit: ab1c063ab08e069fbe62919828fa634a2e222bbf
--8<---------------cut here---------------end--------------->8---

Since GLib does not depend on Inkscape, the =E2=80=98--with-input=E2=80=99 =
flag should
have no effect: we should get the same glib derivation.  However, we=E2=80=
=99re
not.

If we diff the =E2=80=98glibc-2.60.6-guile-builder=E2=80=99 files of each d=
erivation, we
see that the second one has a duplicate entry:

  (define %build-inputs
    `(=E2=80=A6
      ("python" . "/gnu/store/78w7y0lxar70j512iqw8x3nimzj10yga-python-3.7.4=
")
      ("python" . "/gnu/store/78w7y0lxar70j512iqw8x3nimzj10yga-python-3.7.4=
")
      =E2=80=A6))

whereas the first one doesn=E2=80=99t have this duplicate entry.  IOW, the =
two
derivations are functionally equivalent but are not bit-identical.

Indeed, evaluating:

  (bag-transitive-inputs
   (package->bag ((package-input-rewriting '()) glib)))

shows that we have two =E2=80=9Cpython=E2=80=9D packages there that are not=
 =E2=80=98eq?=E2=80=99.

To be continued=E2=80=A6

Ludo=E2=80=99.




Acknowledgement sent to Ludovic Courtès <ludovic.courtes@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-guix@HIDDEN. Full text available.
Report forwarded to bug-guix@HIDDEN:
bug#38100; Package guix. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Mon, 3 Aug 2020 14:45:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.