From unknown Wed Jun 25 00:27:16 2025 X-Loop: help-debbugs@gnu.org Subject: bug#43890: =?UTF-8?Q?=E2=80=98package-input-rewriting/spec=E2=80=99?= can introduce unnecessary variants Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Fri, 09 Oct 2020 20:15:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 43890 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: 43890@debbugs.gnu.org X-Debbugs-Original-To: bug-guix@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.160227446823493 (code B ref -1); Fri, 09 Oct 2020 20:15:01 +0000 Received: (at submit) by debbugs.gnu.org; 9 Oct 2020 20:14:28 +0000 Received: from localhost ([127.0.0.1]:36345 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kQymZ-00066q-Tz for submit@debbugs.gnu.org; Fri, 09 Oct 2020 16:14:28 -0400 Received: from lists.gnu.org ([209.51.188.17]:40448) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kQymX-00066h-Sx for submit@debbugs.gnu.org; Fri, 09 Oct 2020 16:14:26 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59786) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kQymX-0006tx-M5 for bug-guix@gnu.org; Fri, 09 Oct 2020 16:14:25 -0400 Received: from mail2-relais-roc.national.inria.fr ([192.134.164.83]:29049) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kQymV-0008CG-Aw for bug-guix@gnu.org; Fri, 09 Oct 2020 16:14:25 -0400 X-IronPort-AV: E=Sophos;i="5.77,355,1596492000"; d="scan'208";a="471864653" Received: from 91-160-117-201.subs.proxad.net (HELO ribbon) ([91.160.117.201]) by mail2-relais-roc.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 09 Oct 2020 22:14:09 +0200 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 18 =?UTF-8?Q?Vend=C3=A9miaire?= an 229 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: Fri, 09 Oct 2020 22:14:08 +0200 Message-ID: <87v9fji2cv.fsf@inria.fr> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=192.134.164.83; envelope-from=ludovic.courtes@inria.fr; helo=mail2-relais-roc.national.inria.fr X-detected-operating-system: by eggs.gnu.org: First seen = 2020/10/09 16:14:18 X-ACL-Warn: Detected OS = ??? X-Spam_score_int: -68 X-Spam_score: -6.9 X-Spam_bar: ------ X-Spam_report: (-6.9 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_HI=-5, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) Consider this example: --8<---------------cut here---------------start------------->8--- $ guix describe Generacio 162 Oct 01 2020 00:23:38 (nuna) guix 7607ace repository URL: https://git.savannah.gnu.org/git/guix.git branch: master commit: 7607ace5091aea0157ba5c8a508129cc5fc4f931 $ guix build inkscape --no-grafts -d /gnu/store/arjs5hb4wmy6dh5d3y8bbs808ki9abf8-inkscape-1.0.1.drv $ guix build inkscape --no-grafts -d --with-graft=3Dglib=3Dglib-networking /gnu/store/zd8mm3w6x9c97anfaly77fz28s5y3i5h-inkscape-1.0.1.drv $ guix build inkscape --no-grafts -d --with-graft=3Dlibreoffice=3Dabiword /gnu/store/arjs5hb4wmy6dh5d3y8bbs808ki9abf8-inkscape-1.0.1.drv --8<---------------cut here---------------end--------------->8--- The last one is fine: it has no effect. The second one is problematic: since we=E2=80=99re using =E2=80=98--no-graf= ts=E2=80=99, the =E2=80=98--with-graft=E2=80=99 option should have absolutely no effect; yet= , it yields a different derivation. On closer inspection, we see that the core issue is that =E2=80=98gobject-introspection=E2=80=99 in the second case ends up with =E2= =80=98libffi=E2=80=99 twice in its =E2=80=98*-guile-builder=E2=80=99 script, a problem similar to . (=E2=80=98libffi=E2=80=99 is propagat= ed by both =E2=80=98glib=E2=80=99 and =E2=80=98gobject-introspection=E2=80=99.) Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Fri Oct 09 16:22:38 2020 Received: (at control) by debbugs.gnu.org; 9 Oct 2020 20:22:38 +0000 Received: from localhost ([127.0.0.1]:36350 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kQyuT-0006JO-RQ for submit@debbugs.gnu.org; Fri, 09 Oct 2020 16:22:38 -0400 Received: from mail2-relais-roc.national.inria.fr ([192.134.164.83]:57276) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kQyuQ-0006JA-O6 for control@debbugs.gnu.org; Fri, 09 Oct 2020 16:22:37 -0400 X-IronPort-AV: E=Sophos;i="5.77,355,1596492000"; d="scan'208";a="471865465" Received: from 91-160-117-201.subs.proxad.net (HELO ribbon) ([91.160.117.201]) by mail2-relais-roc.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 09 Oct 2020 22:22:28 +0200 Date: Fri, 09 Oct 2020 22:22:28 +0200 Message-Id: <87tuv3i1yz.fsf@gnu.org> To: control@debbugs.gnu.org From: =?utf-8?Q?Ludovic_Court=C3=A8s?= Subject: control message for bug #43890 MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -4.0 (----) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) severity 43890 important quit From unknown Wed Jun 25 00:27:16 2025 X-Loop: help-debbugs@gnu.org Subject: bug#43890: =?UTF-8?Q?=E2=80=98package-input-rewriting/spec=E2=80=99?= can introduce unnecessary variants Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Sun, 11 Oct 2020 13:10:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 43890 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: 43890@debbugs.gnu.org Received: via spool by 43890-submit@debbugs.gnu.org id=B43890.160242178721195 (code B ref 43890); Sun, 11 Oct 2020 13:10:01 +0000 Received: (at 43890) by debbugs.gnu.org; 11 Oct 2020 13:09:47 +0000 Received: from localhost ([127.0.0.1]:39317 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kRb6h-0005Vm-EZ for submit@debbugs.gnu.org; Sun, 11 Oct 2020 09:09:47 -0400 Received: from eggs.gnu.org ([209.51.188.92]:56104) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kRb6f-0005VY-Bi for 43890@debbugs.gnu.org; Sun, 11 Oct 2020 09:09:45 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:52012) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kRb6a-0005Hm-5U for 43890@debbugs.gnu.org; Sun, 11 Oct 2020 09:09:40 -0400 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=50656 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1kRb6Z-0005an-OA for 43890@debbugs.gnu.org; Sun, 11 Oct 2020 09:09:39 -0400 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: <87v9fji2cv.fsf@inria.fr> Date: Sun, 11 Oct 2020 15:09:37 +0200 In-Reply-To: <87v9fji2cv.fsf@inria.fr> ("Ludovic =?UTF-8?Q?Court=C3=A8s?="'s message of "Fri, 09 Oct 2020 22:14:08 +0200") Message-ID: <87lfgcgb8u.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Ludovic Court=C3=A8s skribis: > $ guix describe > Generacio 162 Oct 01 2020 00:23:38 (nuna) > guix 7607ace > repository URL: https://git.savannah.gnu.org/git/guix.git > branch: master > commit: 7607ace5091aea0157ba5c8a508129cc5fc4f931 > $ guix build inkscape --no-grafts -d > /gnu/store/arjs5hb4wmy6dh5d3y8bbs808ki9abf8-inkscape-1.0.1.drv > $ guix build inkscape --no-grafts -d --with-graft=3Dglib=3Dglib-networking > /gnu/store/zd8mm3w6x9c97anfaly77fz28s5y3i5h-inkscape-1.0.1.drv > $ guix build inkscape --no-grafts -d --with-graft=3Dlibreoffice=3Dabiword > /gnu/store/arjs5hb4wmy6dh5d3y8bbs808ki9abf8-inkscape-1.0.1.drv > > The last one is fine: it has no effect. > > The second one is problematic: since we=E2=80=99re using =E2=80=98--no-gr= afts=E2=80=99, the > =E2=80=98--with-graft=E2=80=99 option should have absolutely no effect; y= et, it yields a > different derivation. > > On closer inspection, we see that the core issue is that > =E2=80=98gobject-introspection=E2=80=99 in the second case ends up with = =E2=80=98libffi=E2=80=99 twice > in its =E2=80=98*-guile-builder=E2=80=99 script, a problem similar to > . (=E2=80=98libffi=E2=80=99 is propag= ated by both > =E2=80=98glib=E2=80=99 and =E2=80=98gobject-introspection=E2=80=99.) Here are test cases for this: --=-=-= Content-Type: text/x-patch Content-Disposition: inline diff --git a/tests/guix-build.sh b/tests/guix-build.sh index 6dbb53206e..1cfff329f1 100644 --- a/tests/guix-build.sh +++ b/tests/guix-build.sh @@ -262,6 +262,12 @@ drv1=`guix build glib -d` drv2=`guix build glib -d --with-input=libreoffice=inkscape` test "$drv1" = "$drv2" +# '--with-graft' should have no effect when using '--no-grafts'. +# See . +drv1=`guix build inkscape -d --no-grafts` +drv2=`guix build inkscape -d --no-grafts --with-graft=glib=glib-networking` +test "$drv1" = "$drv2" + # Rewriting implicit inputs. drv1=`guix build hello -d` drv2=`guix build hello -d --with-input=gcc=gcc-toolchain` diff --git a/tests/packages.scm b/tests/packages.scm index 5d5abcbd76..e7c43b8939 100644 --- a/tests/packages.scm +++ b/tests/packages.scm @@ -1419,7 +1419,8 @@ (build-system trivial-build-system) (inputs `(("dep" ,dep1))))) (rewrite (package-input-rewriting/spec - `(("coreutils" . ,(const sed))))) + `(("coreutils" . ,(const sed))) + #:deep? #f)) ;avoid creating circular deps (p1 (rewrite p0))) (match (package-inputs p1) ((("dep" dep)) @@ -1430,6 +1431,49 @@ (derivation-file-name (package-derivation %store coreutils)))))))) +(test-assert "package-input-rewriting/spec, identity" + ;; Make sure that 'package-input-rewriting/spec' doesn't gratuitously + ;; introduce variants. In this case, the LIBFFI propagated input should not + ;; be duplicated when passing GOBJECT through REWRITE. + ;; See . + (let* ((libffi (dummy-package "libffi" + (build-system trivial-build-system))) + (glib (dummy-package "glib" + (build-system trivial-build-system) + (propagated-inputs `(("libffi" ,libffi))))) + (gobject (dummy-package "gobject-introspection" + (build-system trivial-build-system) + (inputs `(("glib" ,glib))) + (propagated-inputs `(("libffi" ,libffi))))) + (rewrite (package-input-rewriting/spec + `(("glib" . ,identity))))) + (and (= (length (package-transitive-inputs gobject)) + (length (package-transitive-inputs (rewrite gobject)))) + (string=? (derivation-file-name + (package-derivation %store (rewrite gobject))) + (derivation-file-name + (package-derivation %store gobject)))))) + +(test-assert "package-input-rewriting, identity" + ;; Similar to the test above, but with 'package-input-rewriting'. + ;; See . + (let* ((libffi (dummy-package "libffi" + (build-system trivial-build-system))) + (glib (dummy-package "glib" + (build-system trivial-build-system) + (propagated-inputs `(("libffi" ,libffi))))) + (gobject (dummy-package "gobject-introspection" + (build-system trivial-build-system) + (inputs `(("glib" ,glib))) + (propagated-inputs `(("libffi" ,libffi))))) + (rewrite (package-input-rewriting `((,glib . ,glib))))) + (and (= (length (package-transitive-inputs gobject)) + (length (package-transitive-inputs (rewrite gobject)))) + (string=? (derivation-file-name + (package-derivation %store (rewrite gobject))) + (derivation-file-name + (package-derivation %store gobject)))))) + (test-equal "package-patched-vulnerabilities" '(("CVE-2015-1234") ("CVE-2016-1234" "CVE-2018-4567") --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Unfortunately it=E2=80=99s again pretty hard to fix. We should rely less on pointer equality (and not break =E2=80=9Cequational reasoning=E2=80=9D), but OTOH (1) we need it for performance reasons, and (= 2) packages are parameterized in arbitrary ways (its thunked fields can depend on (%current-system), etc.) which makes it impossible to define a faithful =E2=80=98package=3D?=E2=80=99 predicate. Ludo=E2=80=99. --=-=-=-- From unknown Wed Jun 25 00:27:16 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Subject: bug#43890: closed (Re: bug#43890: =?UTF-8?Q?=E2=80=98package-input-rewriting/spec=E2=80=99?= can introduce unnecessary variants) Message-ID: References: <878sc1dky2.fsf@gnu.org> <87v9fji2cv.fsf@inria.fr> X-Gnu-PR-Message: they-closed 43890 X-Gnu-PR-Package: guix Reply-To: 43890@debbugs.gnu.org Date: Tue, 20 Oct 2020 14:36:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1603204562-4866-1" This is a multi-part message in MIME format... ------------=_1603204562-4866-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #43890: =E2=80=98package-input-rewriting/spec=E2=80=99 can introduce unnece= ssary variants which was filed against the guix package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 43890@debbugs.gnu.org. --=20 43890: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D43890 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1603204562-4866-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 43890-done) by debbugs.gnu.org; 20 Oct 2020 14:35:51 +0000 Received: from localhost ([127.0.0.1]:46264 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kUsjq-0001G0-T4 for submit@debbugs.gnu.org; Tue, 20 Oct 2020 10:35:50 -0400 Received: from eggs.gnu.org ([209.51.188.92]:38184) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kUsjm-0001Fl-DF for 43890-done@debbugs.gnu.org; Tue, 20 Oct 2020 10:35:46 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:56569) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kUsjh-0001K3-47 for 43890-done@debbugs.gnu.org; Tue, 20 Oct 2020 10:35:37 -0400 Received: from [2001:660:6102:320:e120:2c8f:8909:cdfe] (port=46088 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1kUsjg-0006dm-IF for 43890-done@debbugs.gnu.org; Tue, 20 Oct 2020 10:35:36 -0400 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: 43890-done@debbugs.gnu.org Subject: Re: bug#43890: =?utf-8?Q?=E2=80=98package-input-rewriting=2Fspec?= =?utf-8?Q?=E2=80=99?= can introduce unnecessary variants References: <87v9fji2cv.fsf@inria.fr> Date: Tue, 20 Oct 2020 16:35:33 +0200 In-Reply-To: <87v9fji2cv.fsf@inria.fr> ("Ludovic =?utf-8?Q?Court=C3=A8s=22?= =?utf-8?Q?'s?= message of "Fri, 09 Oct 2020 22:14:08 +0200") Message-ID: <878sc1dky2.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 43890-done X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Ludovic Court=C3=A8s skribis: > Consider this example: > > $ guix describe > Generacio 162 Oct 01 2020 00:23:38 (nuna) > guix 7607ace > repository URL: https://git.savannah.gnu.org/git/guix.git > branch: master > commit: 7607ace5091aea0157ba5c8a508129cc5fc4f931 > $ guix build inkscape --no-grafts -d > /gnu/store/arjs5hb4wmy6dh5d3y8bbs808ki9abf8-inkscape-1.0.1.drv > $ guix build inkscape --no-grafts -d --with-graft=3Dglib=3Dglib-networking > /gnu/store/zd8mm3w6x9c97anfaly77fz28s5y3i5h-inkscape-1.0.1.drv > $ guix build inkscape --no-grafts -d --with-graft=3Dlibreoffice=3Dabiword > /gnu/store/arjs5hb4wmy6dh5d3y8bbs808ki9abf8-inkscape-1.0.1.drv > > The last one is fine: it has no effect. > > The second one is problematic: since we=E2=80=99re using =E2=80=98--no-gr= afts=E2=80=99, the > =E2=80=98--with-graft=E2=80=99 option should have absolutely no effect; y= et, it yields a > different derivation. Fixed in 8db4ebb0cd9bfdcf1aea63eb8d20eb6af0c87c93. \o/ It makes =E2=80=98--with-debug-info=E2=80=99 more practical. The difficulty is to find out where the difference is and what piece of code introduced a non-eq?-but-equal package. Likewise, the test suite catches corner cases that can take a while to address. Related to that, commit 6b4663363c061071c10209f71aed1017a241af6c deletes duplicates in =E2=80=98bag->derivation=E2=80=99, which should make the whol= e thing less sensitive to the introduction of non-eq?-but-equal packages in the graph. Ludo=E2=80=99. ------------=_1603204562-4866-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 9 Oct 2020 20:14:28 +0000 Received: from localhost ([127.0.0.1]:36345 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kQymZ-00066q-Tz for submit@debbugs.gnu.org; Fri, 09 Oct 2020 16:14:28 -0400 Received: from lists.gnu.org ([209.51.188.17]:40448) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kQymX-00066h-Sx for submit@debbugs.gnu.org; Fri, 09 Oct 2020 16:14:26 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59786) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kQymX-0006tx-M5 for bug-guix@gnu.org; Fri, 09 Oct 2020 16:14:25 -0400 Received: from mail2-relais-roc.national.inria.fr ([192.134.164.83]:29049) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kQymV-0008CG-Aw for bug-guix@gnu.org; Fri, 09 Oct 2020 16:14:25 -0400 X-IronPort-AV: E=Sophos;i="5.77,355,1596492000"; d="scan'208";a="471864653" Received: from 91-160-117-201.subs.proxad.net (HELO ribbon) ([91.160.117.201]) by mail2-relais-roc.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 09 Oct 2020 22:14:09 +0200 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: bug-guix@gnu.org Subject: =?utf-8?Q?=E2=80=98package-input-rewriting=2Fspec=E2=80=99?= can introduce unnecessary variants X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 18 =?utf-8?Q?Vend=C3=A9miaire?= an 229 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: Fri, 09 Oct 2020 22:14:08 +0200 Message-ID: <87v9fji2cv.fsf@inria.fr> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=192.134.164.83; envelope-from=ludovic.courtes@inria.fr; helo=mail2-relais-roc.national.inria.fr X-detected-operating-system: by eggs.gnu.org: First seen = 2020/10/09 16:14:18 X-ACL-Warn: Detected OS = ??? X-Spam_score_int: -68 X-Spam_score: -6.9 X-Spam_bar: ------ X-Spam_report: (-6.9 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_HI=-5, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) Consider this example: --8<---------------cut here---------------start------------->8--- $ guix describe Generacio 162 Oct 01 2020 00:23:38 (nuna) guix 7607ace repository URL: https://git.savannah.gnu.org/git/guix.git branch: master commit: 7607ace5091aea0157ba5c8a508129cc5fc4f931 $ guix build inkscape --no-grafts -d /gnu/store/arjs5hb4wmy6dh5d3y8bbs808ki9abf8-inkscape-1.0.1.drv $ guix build inkscape --no-grafts -d --with-graft=3Dglib=3Dglib-networking /gnu/store/zd8mm3w6x9c97anfaly77fz28s5y3i5h-inkscape-1.0.1.drv $ guix build inkscape --no-grafts -d --with-graft=3Dlibreoffice=3Dabiword /gnu/store/arjs5hb4wmy6dh5d3y8bbs808ki9abf8-inkscape-1.0.1.drv --8<---------------cut here---------------end--------------->8--- The last one is fine: it has no effect. The second one is problematic: since we=E2=80=99re using =E2=80=98--no-graf= ts=E2=80=99, the =E2=80=98--with-graft=E2=80=99 option should have absolutely no effect; yet= , it yields a different derivation. On closer inspection, we see that the core issue is that =E2=80=98gobject-introspection=E2=80=99 in the second case ends up with =E2= =80=98libffi=E2=80=99 twice in its =E2=80=98*-guile-builder=E2=80=99 script, a problem similar to . (=E2=80=98libffi=E2=80=99 is propagat= ed by both =E2=80=98glib=E2=80=99 and =E2=80=98gobject-introspection=E2=80=99.) Ludo=E2=80=99. ------------=_1603204562-4866-1--