From unknown Sat Jun 14 19:15:02 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#43578] [PATCH 0/4] Rewriting implicit inputs with 'package-input-rewriting' & co. Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 23 Sep 2020 16:14:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 43578 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 43578@debbugs.gnu.org Cc: Ludovic =?UTF-8?Q?Court=C3=A8s?= X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.16008775864466 (code B ref -1); Wed, 23 Sep 2020 16:14:01 +0000 Received: (at submit) by debbugs.gnu.org; 23 Sep 2020 16:13:06 +0000 Received: from localhost ([127.0.0.1]:37595 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kL7OE-00019x-EY for submit@debbugs.gnu.org; Wed, 23 Sep 2020 12:13:06 -0400 Received: from lists.gnu.org ([209.51.188.17]:44644) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kL7O9-00019j-OP for submit@debbugs.gnu.org; Wed, 23 Sep 2020 12:13:04 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47774) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kL7O9-0005rp-Gj for guix-patches@gnu.org; Wed, 23 Sep 2020 12:13:01 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:46893) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kL7O8-0006j5-Fn; Wed, 23 Sep 2020 12:13:00 -0400 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=52508 helo=gnu.org) by fencepost.gnu.org with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1kL7O7-0001pK-L4; Wed, 23 Sep 2020 12:13:00 -0400 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Date: Wed, 23 Sep 2020 18:12:53 +0200 Message-Id: <20200923161253.2378-1-ludo@gnu.org> X-Mailer: git-send-email 2.28.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 (---) Hello Guix! This patch set aims to hit two bird hunters with one stone: initially my goal was to fix , which has become a hindrance to the use of package transformation options, but it also ends up addressing the fact that those options did not, until now, rewrite implicit dependencies. Concretely, the following commands had no effect thus far: guix build python-itsdangerous --with-input=python=python2 guix build hello --with-input=gcc=gcc-toolchain@10 In both cases, this is because the input we want to change is an implicit input. This patch set fixes that, and it fixes as a side effect. This opens new possibilities. ‘--with-input=python=python2’ is one of them, but ‘--with-input=gcc=gcc-toolchain@10’ is not (it fails to build for obscure reasons that I’ll fix in ‘core-updates’, and it rebuilds the world anyway, which is not practical). Another thing that I find interesting is: $ guix build hello --with-graft=glibc=glibc@2.29 /gnu/store/6jv7icpjbl3pvj24db2q2fmdly9vgp4d-hello-2.10 $ /gnu/store/6jv7icpjbl3pvj24db2q2fmdly9vgp4d-hello-2.10/bin/hello Saluton, mondo! $ LD_TRACE_LOADED_OBJECTS=yes /gnu/store/6jv7icpjbl3pvj24db2q2fmdly9vgp4d-hello-2.10/bin/hello linux-vdso.so.1 (0x00007ffcc87f8000) libgcc_s.so.1 => /gnu/store/1sqr5fa6jbksqmi7hibqaffixy3b1j0y-gcc-7.5.0-lib/lib/libgcc_s.so.1 (0x00007f3f36c3c000) libc.so.6 => /gnu/store/i4iqkjx34r3nmwwblfmkbsbsd3pgapfp-glibc-2.29/lib/libc.so.6 (0x00007f3f36a82000) /gnu/store/i4iqkjx34r3nmwwblfmkbsbsd3pgapfp-glibc-2.29/lib/ld-linux-x86-64.so.2 (0x00007f3f36c57000) It “relinks” the package against a different libc, assuming the ABI is compatible (this particular example downgrades glibc, probably less useful in the real world than upgrading; it works for ‘hello’ but not for ‘inkscape’ due to ABI differences.) Feedback welcome! Ludo’. Ludovic Courtès (4): packages: 'package-mapping' can recurse on implicit inputs. packages: 'package-input-rewriting/spec' can rewrite implicit dependencies. packages: 'package-mapping' correctly recurses into 'replacement'. packages: 'package-input-rewriting' has a #:deep? parameter. doc/guix.texi | 28 ++++---- gnu/packages/guile.scm | 6 +- guix/packages.scm | 153 ++++++++++++++++++++++++++++------------ tests/guix-build.sh | 11 +++ tests/packages.scm | 149 ++++++++++++++++++++++++++++++++++++-- tests/scripts-build.scm | 12 +++- 6 files changed, 291 insertions(+), 68 deletions(-) -- 2.28.0 From unknown Sat Jun 14 19:15:02 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#43578] [PATCH 1/4] packages: 'package-mapping' can recurse on implicit inputs. References: <20200923161253.2378-1-ludo@gnu.org> In-Reply-To: <20200923161253.2378-1-ludo@gnu.org> Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 23 Sep 2020 16:24:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 43578 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 43578@debbugs.gnu.org Cc: Ludovic =?UTF-8?Q?Court=C3=A8s?= Received: via spool by 43578-submit@debbugs.gnu.org id=B43578.16008782135912 (code B ref 43578); Wed, 23 Sep 2020 16:24:02 +0000 Received: (at 43578) by debbugs.gnu.org; 23 Sep 2020 16:23:33 +0000 Received: from localhost ([127.0.0.1]:37616 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kL7YK-0001XD-Lt for submit@debbugs.gnu.org; Wed, 23 Sep 2020 12:23:33 -0400 Received: from eggs.gnu.org ([209.51.188.92]:44652) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kL7YI-0001Wq-Qs for 43578@debbugs.gnu.org; Wed, 23 Sep 2020 12:23:31 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:47175) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kL7YD-0000Is-Cx; Wed, 23 Sep 2020 12:23:25 -0400 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=52578 helo=gnu.org) by fencepost.gnu.org with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1kL7YB-0002gP-NW; Wed, 23 Sep 2020 12:23:24 -0400 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Date: Wed, 23 Sep 2020 18:23:15 +0200 Message-Id: <20200923162318.2800-1-ludo@gnu.org> X-Mailer: git-send-email 2.28.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 (---) * guix/packages.scm (build-system-with-package-mapping): New procedure. (package-mapping): Add #:deep? and honor it. * tests/packages.scm ("package-mapping"): Compare the direct inputs of the bag of P0 and that of P1. ("package-mapping, deep"): New test. --- doc/guix.texi | 5 ++-- guix/packages.scm | 65 +++++++++++++++++++++++++++++++++++----------- tests/packages.scm | 36 ++++++++++++++++++++++++- 3 files changed, 88 insertions(+), 18 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index f7e2204b53..4595008c4f 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -6294,10 +6294,11 @@ A more generic procedure to rewrite a package dependency graph is @code{package-mapping}: it supports arbitrary changes to nodes in the graph. -@deffn {Scheme Procedure} package-mapping @var{proc} [@var{cut?}] +@deffn {Scheme Procedure} package-mapping @var{proc} [@var{cut?}] [#:deep? #f] Return a procedure that, given a package, applies @var{proc} to all the packages depended on and returns the resulting package. The procedure stops recursion -when @var{cut?} returns true for a given package. +when @var{cut?} returns true for a given package. When @var{deep?} is true, @var{proc} is +applied to implicit inputs as well. @end deffn @menu diff --git a/guix/packages.scm b/guix/packages.scm index 6598bd3149..171fd048ef 100644 --- a/guix/packages.scm +++ b/guix/packages.scm @@ -968,10 +968,31 @@ packages they depend on, recursively." (vhash-consq package #t visited) (fold set-insert closure dependencies)))))))) -(define* (package-mapping proc #:optional (cut? (const #f))) +(define (build-system-with-package-mapping bs rewrite) + "Return a variant of BS, a build system, that rewrites a bag's inputs by +passing them through REWRITE, a procedure that takes an input tuplet and +returns a \"rewritten\" input tuplet." + (define lower + (build-system-lower bs)) + + (define (lower* . args) + (let ((lowered (apply lower args))) + (bag + (inherit lowered) + (build-inputs (map rewrite (bag-build-inputs lowered))) + (host-inputs (map rewrite (bag-host-inputs lowered))) + (target-inputs (map rewrite (bag-target-inputs lowered)))))) + + (build-system + (inherit bs) + (lower lower*))) + +(define* (package-mapping proc #:optional (cut? (const #f)) + #:key deep?) "Return a procedure that, given a package, applies PROC to all the packages depended on and returns the resulting package. The procedure stops recursion -when CUT? returns true for a given package." +when CUT? returns true for a given package. When DEEP? is true, PROC is +applied to implicit inputs as well." (define (rewrite input) (match input ((label (? package? package) outputs ...) @@ -980,21 +1001,35 @@ when CUT? returns true for a given package." (_ input))) + (define mapping-property + ;; Property indicating whether the package has already been processed. + (gensym " package-mapping-done")) + (define replace (mlambdaq (p) - ;; Return a variant of P with PROC applied to P and its explicit - ;; dependencies, recursively. Memoize the transformations. Failing to - ;; do that, we would build a huge object graph with lots of duplicates, - ;; which in turns prevents us from benefiting from memoization in - ;; 'package-derivation'. - (let ((p (proc p))) - (package - (inherit p) - (location (package-location p)) - (inputs (map rewrite (package-inputs p))) - (native-inputs (map rewrite (package-native-inputs p))) - (propagated-inputs (map rewrite (package-propagated-inputs p))) - (replacement (and=> (package-replacement p) proc)))))) + ;; If P is the result of a previous call, return it. + (if (assq-ref (package-properties p) mapping-property) + p + + ;; Return a variant of P with PROC applied to P and its explicit + ;; dependencies, recursively. Memoize the transformations. Failing + ;; to do that, we would build a huge object graph with lots of + ;; duplicates, which in turns prevents us from benefiting from + ;; memoization in 'package-derivation'. + (let ((p (proc p))) + (package + (inherit p) + (location (package-location p)) + (build-system (if deep? + (build-system-with-package-mapping + (package-build-system p) rewrite) + (package-build-system p))) + (inputs (map rewrite (package-inputs p))) + (native-inputs (map rewrite (package-native-inputs p))) + (propagated-inputs (map rewrite (package-propagated-inputs p))) + (replacement (and=> (package-replacement p) proc)) + (properties `((,mapping-property . #t) + ,@(package-properties p)))))))) replace) diff --git a/tests/packages.scm b/tests/packages.scm index cbd0503733..f33332a461 100644 --- a/tests/packages.scm +++ b/tests/packages.scm @@ -1172,15 +1172,24 @@ (let* ((dep (dummy-package "chbouib" (native-inputs `(("x" ,grep))))) (p0 (dummy-package "example" + (source 77) (inputs `(("foo" ,coreutils) ("bar" ,grep) ("baz" ,dep))))) (transform (lambda (p) (package (inherit p) (source 42)))) (rewrite (package-mapping transform)) - (p1 (rewrite p0))) + (p1 (rewrite p0)) + (bag0 (package->bag p0)) + (bag1 (package->bag p1))) (and (eq? p1 (rewrite p0)) (eqv? 42 (package-source p1)) + + ;; Implicit inputs should be left unchanged (skip "source", "foo", + ;; "bar", and "baz" in this comparison). + (equal? (drop (bag-direct-inputs bag0) 4) + (drop (bag-direct-inputs bag1) 4)) + (match (package-inputs p1) ((("foo" dep1) ("bar" dep2) ("baz" dep3)) (and (eq? dep1 (rewrite coreutils)) ;memoization @@ -1194,6 +1203,31 @@ (and (eq? dep (rewrite grep)) (package-source dep)))))))))) +(test-equal "package-mapping, deep" + '(42) + (let* ((p0 (dummy-package "example" + (inputs `(("foo" ,coreutils) + ("bar" ,grep))))) + (transform (lambda (p) + (package (inherit p) (source 42)))) + (rewrite (package-mapping transform #:deep? #t)) + (p1 (rewrite p0)) + (bag (package->bag p1))) + (and (eq? p1 (rewrite p0)) + (match (bag-direct-inputs bag) + ((("source" 42) ("foo" dep1) ("bar" dep2) rest ..1) + (and (eq? dep1 (rewrite coreutils)) ;memoization + (eq? dep2 (rewrite grep)) + (= 42 (package-source dep1)) + (= 42 (package-source dep2)) + + ;; Check that implicit inputs of P0 also got rewritten. + (delete-duplicates + (map (match-lambda + ((_ package . _) + (package-source package))) + rest)))))))) + (test-assert "package-input-rewriting" (let* ((dep (dummy-package "chbouib" (native-inputs `(("x" ,grep))))) -- 2.28.0 From unknown Sat Jun 14 19:15:02 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#43578] [PATCH 2/4] packages: 'package-input-rewriting/spec' can rewrite implicit dependencies. Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 23 Sep 2020 16:24:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 43578 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 43578@debbugs.gnu.org Cc: Ludovic =?UTF-8?Q?Court=C3=A8s?= Received: via spool by 43578-submit@debbugs.gnu.org id=B43578.16008782175936 (code B ref 43578); Wed, 23 Sep 2020 16:24:03 +0000 Received: (at 43578) by debbugs.gnu.org; 23 Sep 2020 16:23:37 +0000 Received: from localhost ([127.0.0.1]:37620 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kL7YO-0001Xe-9X for submit@debbugs.gnu.org; Wed, 23 Sep 2020 12:23:36 -0400 Received: from eggs.gnu.org ([209.51.188.92]:44658) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kL7YK-0001Wt-9S for 43578@debbugs.gnu.org; Wed, 23 Sep 2020 12:23:33 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:47177) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kL7YE-0000Jp-Sc; Wed, 23 Sep 2020 12:23:26 -0400 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=52578 helo=gnu.org) by fencepost.gnu.org with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1kL7YD-0002gP-G2; Wed, 23 Sep 2020 12:23:26 -0400 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Date: Wed, 23 Sep 2020 18:23:16 +0200 Message-Id: <20200923162318.2800-2-ludo@gnu.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200923162318.2800-1-ludo@gnu.org> References: <20200923162318.2800-1-ludo@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 (---) With this change, '--with-input', '--with-graft', etc. also apply to implicit dependencies. Thus, it's now possible to do: guix build python-itsdangerous --with-input=python-wrapper=python@2 or: guix build hello --with-graft=glibc=glibc@2.29 Additionally, before, implicit inputs were not rewritten, which could lead to duplicates in the output of 'bag-transitive-inputs' (packages that are not 'eq?' but lead to the same derivation). This in turn would lead to unnecessary rebuilds when using '--with-input' & co. This change fixes it by ensuring even implicit inputs are rewritten. Fixes . * guix/packages.scm (package-input-rewriting/spec): Add #:deep? defaulting to #true, and pass it to 'package-mapping'. [replacement-property]: New variable. [rewrite]: Check that property and set it on the result of PROC. [cut?]: New procedure. * tests/packages.scm ("package-input-rewriting/spec"): Ensure implicit inputs were unchanged. ("package-input-rewriting/spec, partial match"): Pass #:deep? #f. ("package-input-rewriting/spec, deep") ("package-input-rewriting/spec, no duplicates"): New tests. (package/inherit): Move before use. * tests/guix-build.sh: Add tests. * tests/scripts-build.scm ("options->transformation, with-graft"): Compare dependencies by package name or derivation file name. * doc/guix.texi (Defining Packages): Adjust accordingly. --- doc/guix.texi | 13 ++++---- guix/packages.scm | 53 +++++++++++++++++++++------------ tests/guix-build.sh | 11 +++++++ tests/packages.scm | 66 +++++++++++++++++++++++++++++++++++++++-- tests/scripts-build.scm | 12 ++++++-- 5 files changed, 124 insertions(+), 31 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index 4595008c4f..e9e1d122ab 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -6270,12 +6270,13 @@ This is exactly what the @option{--with-input} command-line option does The following variant of @code{package-input-rewriting} can match packages to be replaced by name rather than by identity. -@deffn {Scheme Procedure} package-input-rewriting/spec @var{replacements} -Return a procedure that, given a package, applies the given @var{replacements} to -all the package graph (excluding implicit inputs). @var{replacements} is a list of -spec/procedures pair; each spec is a package specification such as @code{"gcc"} or -@code{"guile@@2"}, and each procedure takes a matching package and returns a -replacement for that package. +@deffn {Scheme Procedure} package-input-rewriting/spec @var{replacements} [#:deep? #t] +Return a procedure that, given a package, applies the given +@var{replacements} to all the package graph, including implicit inputs +unless @var{deep?} is false. @var{replacements} is a list of +spec/procedures pair; each spec is a package specification such as +@code{"gcc"} or @code{"guile@@2"}, and each procedure takes a matching +package and returns a replacement for that package. @end deffn The example above could be rewritten this way: diff --git a/guix/packages.scm b/guix/packages.scm index 171fd048ef..f696945e30 100644 --- a/guix/packages.scm +++ b/guix/packages.scm @@ -422,6 +422,16 @@ name of its URI." package) 16))))) +(define-syntax-rule (package/inherit p overrides ...) + "Like (package (inherit P) OVERRIDES ...), except that the same +transformation is done to the package replacement, if any. P must be a bare +identifier, and will be bound to either P or its replacement when evaluating +OVERRIDES." + (let loop ((p p)) + (package (inherit p) + overrides ... + (replacement (and=> (package-replacement p) loop))))) + (define (package-upstream-name package) "Return the upstream name of PACKAGE, which could be different from the name it has in Guix." @@ -1051,12 +1061,12 @@ package and returns its new name after rewrite." (package-mapping rewrite (cut assq <> replacements))) -(define (package-input-rewriting/spec replacements) +(define* (package-input-rewriting/spec replacements #:key (deep? #t)) "Return a procedure that, given a package, applies the given REPLACEMENTS to -all the package graph (excluding implicit inputs). REPLACEMENTS is a list of -spec/procedures pair; each spec is a package specification such as \"gcc\" or -\"guile@2\", and each procedure takes a matching package and returns a -replacement for that package." +all the package graph, including implicit inputs unless DEEP? is false. +REPLACEMENTS is a list of spec/procedures pair; each spec is a package +specification such as \"gcc\" or \"guile@2\", and each procedure takes a +matching package and returns a replacement for that package." (define table (fold (lambda (replacement table) (match replacement @@ -1081,22 +1091,27 @@ replacement for that package." (package-name package) table)) - (define (rewrite package) - (match (find-replacement package) - (#f package) - (proc (proc package)))) + (define replacement-property + (gensym " package-replacement")) - (package-mapping rewrite find-replacement)) + (define (rewrite p) + (if (assq-ref (package-properties p) replacement-property) + p + (match (find-replacement p) + (#f p) + (proc + (let ((new (proc p))) + ;; Mark NEW as already processed. + (package/inherit new + (properties `((,replacement-property . #t) + ,@(package-properties new))))))))) -(define-syntax-rule (package/inherit p overrides ...) - "Like (package (inherit P) OVERRIDES ...), except that the same -transformation is done to the package replacement, if any. P must be a bare -identifier, and will be bound to either P or its replacement when evaluating -OVERRIDES." - (let loop ((p p)) - (package (inherit p) - overrides ... - (replacement (and=> (package-replacement p) loop))))) + (define (cut? p) + (or (assq-ref (package-properties p) replacement-property) + (find-replacement p))) + + (package-mapping rewrite cut? + #:deep? deep?)) ;;; diff --git a/tests/guix-build.sh b/tests/guix-build.sh index 6c08857358..ec2f736ccb 100644 --- a/tests/guix-build.sh +++ b/tests/guix-build.sh @@ -259,6 +259,17 @@ drv1=`guix build guile -d` drv2=`guix build guile --with-input=gimp=ruby -d` test "$drv1" = "$drv2" +# See . +drv1=`guix build glib -d` +drv2=`guix build glib -d --with-input=libreoffice=inkscape` +test "$drv1" = "$drv2" + +# Rewriting implicit inputs. +drv1=`guix build hello -d` +drv2=`guix build hello -d --with-input=gcc=gcc-toolchain` +test "$drv1" != "$drv2" +guix gc -R "$drv2" | grep `guix build -d gcc-toolchain` + if guix build guile --with-input=libunistring=something-really-silly then false; else true; fi diff --git a/tests/packages.scm b/tests/packages.scm index f33332a461..6fa4ad2f1b 100644 --- a/tests/packages.scm +++ b/tests/packages.scm @@ -38,6 +38,7 @@ #:use-module (guix build-system) #:use-module (guix build-system trivial) #:use-module (guix build-system gnu) + #:use-module (guix build-system python) #:use-module (guix memoization) #:use-module (guix profiles) #:use-module (guix scripts package) @@ -45,6 +46,7 @@ #:use-module (gnu packages base) #:use-module (gnu packages guile) #:use-module (gnu packages bootstrap) + #:use-module (gnu packages python) #:use-module (gnu packages version-control) #:use-module (gnu packages xml) #:use-module (srfi srfi-1) @@ -1262,7 +1264,8 @@ ("baz" ,dep))))) (rewrite (package-input-rewriting/spec `(("coreutils" . ,(const sed)) - ("grep" . ,(const findutils))))) + ("grep" . ,(const findutils))) + #:deep? #f)) (p1 (rewrite p0)) (p2 (rewrite p0))) (and (not (eq? p1 p0)) @@ -1279,7 +1282,11 @@ (match (package-native-inputs dep3) ((("x" dep)) (string=? (package-full-name dep) - (package-full-name findutils)))))))))) + (package-full-name findutils))))))) + + ;; Make sure implicit inputs were left unchanged. + (equal? (drop (bag-direct-inputs (package->bag p1)) 3) + (drop (bag-direct-inputs (package->bag p0)) 3))))) (test-assert "package-input-rewriting/spec, partial match" (let* ((dep (dummy-package "chbouib" @@ -1290,7 +1297,8 @@ ("bar" ,dep))))) (rewrite (package-input-rewriting/spec `(("chbouib@123" . ,(const sed)) ;not matched - ("grep" . ,(const findutils))))) + ("grep" . ,(const findutils))) + #:deep? #f)) (p1 (rewrite p0))) (and (not (eq? p1 p0)) (string=? "example" (package-name p1)) @@ -1304,6 +1312,58 @@ (string=? (package-full-name dep) (package-full-name findutils)))))))))) +(test-assert "package-input-rewriting/spec, deep" + (let* ((dep (dummy-package "chbouib")) + (p0 (dummy-package "example" + (build-system gnu-build-system) + (inputs `(("dep" ,dep))))) + (rewrite (package-input-rewriting/spec + `(("tar" . ,(const sed)) + ("gzip" . ,(const findutils))))) + (p1 (rewrite p0)) + (p2 (rewrite p0))) + (and (not (eq? p1 p0)) + (eq? p1 p2) ;memoization + (string=? "example" (package-name p1)) + (match (package-inputs p1) + ((("dep" dep1)) + (and (string=? (package-full-name dep1) + (package-full-name dep)) + (eq? dep1 (rewrite dep))))) ;memoization + + ;; Make sure implicit inputs were replaced. + (match (bag-direct-inputs (package->bag p1)) + ((("dep" dep1) ("tar" tar) ("gzip" gzip) _ ...) + (and (eq? dep1 (rewrite dep)) + (string=? (package-full-name tar) + (package-full-name sed)) + (string=? (package-full-name gzip) + (package-full-name findutils)))))))) + +(test-assert "package-input-rewriting/spec, no duplicates" + ;; Ensure that deep input rewriting does not forget implicit inputs. Doing + ;; so could lead to duplicates in a package's inputs: in the example below, + ;; P0's transitive inputs would contain one rewritten "python" and one + ;; original "python". These two "python" packages are thus not 'eq?' but + ;; they lower to the same derivation. See , + ;; which can be reproduced by passing #:deep? #f. + (let* ((dep0 (dummy-package "dep0" + (build-system trivial-build-system) + (propagated-inputs `(("python" ,python))))) + (p0 (dummy-package "chbouib" + (build-system python-build-system) + (arguments `(#:python ,python)) + (inputs `(("dep0" ,dep0))))) + (rewrite (package-input-rewriting/spec '() #:deep? #t)) + (p1 (rewrite p0)) + (bag1 (package->bag p1)) + (pythons (filter-map (match-lambda + (("python" python) python) + (_ #f)) + (bag-transitive-inputs bag1)))) + (match (delete-duplicates pythons eq?) + ((p) (eq? p (rewrite python)))))) + (test-equal "package-patched-vulnerabilities" '(("CVE-2015-1234") ("CVE-2016-1234" "CVE-2018-4567") diff --git a/tests/scripts-build.scm b/tests/scripts-build.scm index 32876e956a..3491610754 100644 --- a/tests/scripts-build.scm +++ b/tests/scripts-build.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2016, 2017, 2019 Ludovic Courtès +;;; Copyright © 2016, 2017, 2019, 2020 Ludovic Courtès ;;; ;;; This file is part of GNU Guix. ;;; @@ -19,6 +19,7 @@ (define-module (test-scripts-build) #:use-module (guix tests) #:use-module (guix store) + #:use-module (guix derivations) #:use-module (guix packages) #:use-module (guix git-download) #:use-module (guix scripts build) @@ -163,11 +164,16 @@ ((("foo" dep1) ("bar" dep2)) (and (string=? (package-full-name dep1) (package-full-name grep)) - (eq? (package-replacement dep1) findutils) + (string=? (package-full-name (package-replacement dep1)) + (package-full-name findutils)) (string=? (package-name dep2) "chbouib") (match (package-native-inputs dep2) ((("x" dep)) - (eq? (package-replacement dep) findutils))))))))))) + (with-store store + (string=? (derivation-file-name + (package-derivation store findutils)) + (derivation-file-name + (package-derivation store dep)))))))))))))) (test-equal "options->transformation, with-branch" (git-checkout (url "https://example.org") -- 2.28.0 From unknown Sat Jun 14 19:15:02 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#43578] [PATCH 4/4] packages: 'package-input-rewriting' has a #:deep? parameter. Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 23 Sep 2020 16:24:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 43578 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 43578@debbugs.gnu.org Cc: Ludovic =?UTF-8?Q?Court=C3=A8s?= Received: via spool by 43578-submit@debbugs.gnu.org id=B43578.16008782175943 (code B ref 43578); Wed, 23 Sep 2020 16:24:03 +0000 Received: (at 43578) by debbugs.gnu.org; 23 Sep 2020 16:23:37 +0000 Received: from localhost ([127.0.0.1]:37622 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kL7YO-0001Xh-UY for submit@debbugs.gnu.org; Wed, 23 Sep 2020 12:23:37 -0400 Received: from eggs.gnu.org ([209.51.188.92]:44662) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kL7YM-0001Ww-Ls for 43578@debbugs.gnu.org; Wed, 23 Sep 2020 12:23:35 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:47179) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kL7YG-0000Jx-Of; Wed, 23 Sep 2020 12:23:29 -0400 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=52578 helo=gnu.org) by fencepost.gnu.org with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1kL7YG-0002gP-9w; Wed, 23 Sep 2020 12:23:28 -0400 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Date: Wed, 23 Sep 2020 18:23:18 +0200 Message-Id: <20200923162318.2800-4-ludo@gnu.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200923162318.2800-1-ludo@gnu.org> References: <20200923162318.2800-1-ludo@gnu.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 (---) * guix/packages.scm (package-input-rewriting): Add #:deep? and pass it to 'package-mapping'. [replacement-property]: New variable. [rewrite]: Check it. [cut?]: New procedure. * tests/packages.scm ("package-input-rewriting"): Pass #:deep? #f and ensure implicit inputs were not rewritten. Avoid 'eq?' comparisons. ("package-input-rewriting, deep"): New test. * gnu/packages/guile.scm (package-for-guile-2.0, package-for-guile-3.0): Pass #:deep? #f. --- doc/guix.texi | 10 +++++----- gnu/packages/guile.scm | 6 ++++-- guix/packages.scm | 35 +++++++++++++++++++++++++---------- tests/packages.scm | 20 ++++++++++++++++++-- 4 files changed, 52 insertions(+), 19 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index e9e1d122ab..193529bbb1 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -6236,12 +6236,12 @@ transformation is @dfn{input rewriting}, whereby the dependency tree of a package is rewritten by replacing specific inputs by others: @deffn {Scheme Procedure} package-input-rewriting @var{replacements} @ - [@var{rewrite-name}] + [@var{rewrite-name}] [#:deep? #t] Return a procedure that, when passed a package, replaces its direct and -indirect dependencies (but not its implicit inputs) according to -@var{replacements}. @var{replacements} is a list of package pairs; the -first element of each pair is the package to replace, and the second one -is the replacement. +indirect dependencies, including implicit inputs when @var{deep?} is +true, according to @var{replacements}. @var{replacements} is a list of +package pairs; the first element of each pair is the package to replace, +and the second one is the replacement. Optionally, @var{rewrite-name} is a one-argument procedure that takes the name of a package and returns its new name after rewrite. diff --git a/gnu/packages/guile.scm b/gnu/packages/guile.scm index c59daeebe2..280053bf06 100644 --- a/gnu/packages/guile.scm +++ b/gnu/packages/guile.scm @@ -420,11 +420,13 @@ GNU@tie{}Guile. Use the @code{(ice-9 readline)} module and call its ;; A procedure that rewrites the dependency tree of the given package to use ;; GUILE-2.0 instead of GUILE-3.0. (package-input-rewriting `((,guile-3.0 . ,guile-2.0)) - (guile-variant-package-name "guile2.0"))) + (guile-variant-package-name "guile2.0") + #:deep? #f)) (define package-for-guile-2.2 (package-input-rewriting `((,guile-3.0 . ,guile-2.2)) - (guile-variant-package-name "guile2.2"))) + (guile-variant-package-name "guile2.2") + #:deep? #f)) (define-syntax define-deprecated-guile3.0-package (lambda (s) diff --git a/guix/packages.scm b/guix/packages.scm index 0d0d7492b6..4f2bb432be 100644 --- a/guix/packages.scm +++ b/guix/packages.scm @@ -1044,22 +1044,37 @@ applied to implicit inputs as well." replace) (define* (package-input-rewriting replacements - #:optional (rewrite-name identity)) + #:optional (rewrite-name identity) + #:key (deep? #t)) "Return a procedure that, when passed a package, replaces its direct and -indirect dependencies (but not its implicit inputs) according to REPLACEMENTS. -REPLACEMENTS is a list of package pairs; the first element of each pair is the -package to replace, and the second one is the replacement. +indirect dependencies, including implicit inputs when DEEP? is true, according +to REPLACEMENTS. REPLACEMENTS is a list of package pairs; the first element +of each pair is the package to replace, and the second one is the replacement. Optionally, REWRITE-NAME is a one-argument procedure that takes the name of a package and returns its new name after rewrite." + (define replacement-property + ;; Property to tag right-hand sides in REPLACEMENTS. + (gensym " package-replacement")) + (define (rewrite p) - (match (assq-ref replacements p) - (#f (package - (inherit p) - (name (rewrite-name (package-name p))))) - (new new))) + (if (assq-ref (package-properties p) replacement-property) + p + (match (assq-ref replacements p) + (#f (package/inherit p + (name (rewrite-name (package-name p))))) + (new (if deep? + (package/inherit new + (properties `((,replacement-property . #t) + ,@(package-properties new)))) + new))))) - (package-mapping rewrite (cut assq <> replacements))) + (define (cut? p) + (or (assq-ref (package-properties p) replacement-property) + (assq-ref replacements p))) + + (package-mapping rewrite cut? + #:deep? deep?)) (define* (package-input-rewriting/spec replacements #:key (deep? #t)) "Return a procedure that, given a package, applies the given REPLACEMENTS to diff --git a/tests/packages.scm b/tests/packages.scm index e31dea6f72..af8941c2e2 100644 --- a/tests/packages.scm +++ b/tests/packages.scm @@ -1239,7 +1239,8 @@ ("baz" ,dep))))) (rewrite (package-input-rewriting `((,coreutils . ,sed) (,grep . ,findutils)) - (cut string-append "r-" <>))) + (cut string-append "r-" <>) + #:deep? #f)) (p1 (rewrite p0)) (p2 (rewrite p0))) (and (not (eq? p1 p0)) @@ -1253,7 +1254,22 @@ (eq? dep3 (rewrite dep)) ;memoization (match (package-native-inputs dep3) ((("x" dep)) - (eq? dep findutils))))))))) + (eq? dep findutils)))))) + + ;; Make sure implicit inputs were left unchanged. + (equal? (drop (bag-direct-inputs (package->bag p1)) 3) + (drop (bag-direct-inputs (package->bag p0)) 3))))) + +(test-eq "package-input-rewriting, deep" + (derivation-file-name (package-derivation %store sed)) + (let* ((p0 (dummy-package "chbouib" + (build-system python-build-system) + (arguments `(#:python ,python)))) + (rewrite (package-input-rewriting `((,python . ,sed)))) + (p1 (rewrite p0))) + (match (bag-direct-inputs (package->bag p1)) + ((("python" python) _ ...) + (derivation-file-name (package-derivation %store python)))))) (test-assert "package-input-rewriting/spec" (let* ((dep (dummy-package "chbouib" -- 2.28.0 From unknown Sat Jun 14 19:15:02 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#43578] [PATCH 3/4] packages: 'package-mapping' correctly recurses into 'replacement'. Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 23 Sep 2020 16:24:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 43578 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 43578@debbugs.gnu.org Cc: Ludovic =?UTF-8?Q?Court=C3=A8s?= Received: via spool by 43578-submit@debbugs.gnu.org id=B43578.16008782175949 (code B ref 43578); Wed, 23 Sep 2020 16:24:03 +0000 Received: (at 43578) by debbugs.gnu.org; 23 Sep 2020 16:23:37 +0000 Received: from localhost ([127.0.0.1]:37624 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kL7YP-0001Xo-D2 for submit@debbugs.gnu.org; Wed, 23 Sep 2020 12:23:37 -0400 Received: from eggs.gnu.org ([209.51.188.92]:44666) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kL7YM-0001Wx-MV for 43578@debbugs.gnu.org; Wed, 23 Sep 2020 12:23:35 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:47178) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kL7YF-0000Jw-Vw; Wed, 23 Sep 2020 12:23:28 -0400 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=52578 helo=gnu.org) by fencepost.gnu.org with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1kL7YF-0002gP-1w; Wed, 23 Sep 2020 12:23:27 -0400 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Date: Wed, 23 Sep 2020 18:23:17 +0200 Message-Id: <20200923162318.2800-3-ludo@gnu.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200923162318.2800-1-ludo@gnu.org> References: <20200923162318.2800-1-ludo@gnu.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 (---) Previously, something like: guix build glib --with-graft=glibc=glibc@2.29 would produce a result showing that rewriting rules were not applied to libx11@1.6.A (a replacement). * guix/packages.scm (package-mapping): Call REPLACE instead of PROC to 'replacement'. * tests/packages.scm ("package-input-rewriting/spec, graft"): New test. --- guix/packages.scm | 2 +- tests/packages.scm | 27 +++++++++++++++++++++++++++ 2 files changed, 28 insertions(+), 1 deletion(-) diff --git a/guix/packages.scm b/guix/packages.scm index f696945e30..0d0d7492b6 100644 --- a/guix/packages.scm +++ b/guix/packages.scm @@ -1037,7 +1037,7 @@ applied to implicit inputs as well." (inputs (map rewrite (package-inputs p))) (native-inputs (map rewrite (package-native-inputs p))) (propagated-inputs (map rewrite (package-propagated-inputs p))) - (replacement (and=> (package-replacement p) proc)) + (replacement (and=> (package-replacement p) replace)) (properties `((,mapping-property . #t) ,@(package-properties p)))))))) diff --git a/tests/packages.scm b/tests/packages.scm index 6fa4ad2f1b..e31dea6f72 100644 --- a/tests/packages.scm +++ b/tests/packages.scm @@ -1364,6 +1364,33 @@ (match (delete-duplicates pythons eq?) ((p) (eq? p (rewrite python)))))) +(test-equal "package-input-rewriting/spec, graft" + (derivation-file-name (package-derivation %store sed)) + + ;; Make sure replacements are rewritten. + (let* ((dep0 (dummy-package "dep" + (version "1") + (build-system trivial-build-system) + (inputs `(("coreutils" ,coreutils))))) + (dep1 (dummy-package "dep" + (version "0") + (build-system trivial-build-system) + (replacement dep0))) + (p0 (dummy-package "p" + (build-system trivial-build-system) + (inputs `(("dep" ,dep1))))) + (rewrite (package-input-rewriting/spec + `(("coreutils" . ,(const sed))))) + (p1 (rewrite p0))) + (match (package-inputs p1) + ((("dep" dep)) + (match (package-inputs (package-replacement dep)) + ((("coreutils" coreutils)) + ;; COREUTILS is not 'eq?' to SED, so the most reliable way to check + ;; for equality is to lower to a derivation. + (derivation-file-name + (package-derivation %store coreutils)))))))) + (test-equal "package-patched-vulnerabilities" '(("CVE-2015-1234") ("CVE-2016-1234" "CVE-2018-4567") -- 2.28.0 From unknown Sat Jun 14 19:15:02 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#43578] [PATCH 0/4] Rewriting implicit inputs with 'package-input-rewriting' & co. Resent-From: zimoun Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 23 Sep 2020 17:18:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 43578 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: 43578@debbugs.gnu.org Received: via spool by 43578-submit@debbugs.gnu.org id=B43578.160088147213277 (code B ref 43578); Wed, 23 Sep 2020 17:18:01 +0000 Received: (at 43578) by debbugs.gnu.org; 23 Sep 2020 17:17:52 +0000 Received: from localhost ([127.0.0.1]:37706 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kL8Ou-0003S5-9x for submit@debbugs.gnu.org; Wed, 23 Sep 2020 13:17:52 -0400 Received: from mail-qt1-f195.google.com ([209.85.160.195]:36109) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kL8Or-0003Rl-UK for 43578@debbugs.gnu.org; Wed, 23 Sep 2020 13:17:50 -0400 Received: by mail-qt1-f195.google.com with SMTP id n10so542492qtv.3 for <43578@debbugs.gnu.org>; Wed, 23 Sep 2020 10:17:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=8OnZQLQdGGtc2dzQLLkrNkViI7xs0ZoaunFDMcIeeAw=; b=R+Y62V4BMJZHpuJM2Kw/Vo1ZircbREnQpnY+tsV64WaHkuOaSv8ys7i75ORAedC3KU CwUkqQ1VDrFLa9BQfsAt3ND6DckcIF4UWOghwSt+EqkU5PUU9VMQhm1QlbhTM8r3GvdO VXDFEBtz1ZufTEO1x+4OJ1+78j+TLJnA1naxcLjYQi4gDyqQE8Fl3IzvXNpiRN3nk5+A 16DR6k48SqXU+KVDWoos7S/OPVPOBPGbabUT85UpB5EeV+6indmav6wX7HCU+tmO0Os9 b7k7xseNZNciAafcjj2NTzoaHgMtKog+jUumEnSjTeFgpRJTwgXaxZkKES8u3xpdaHKE yDSA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=8OnZQLQdGGtc2dzQLLkrNkViI7xs0ZoaunFDMcIeeAw=; b=YQ8HkbnY6F4eykyUfhyjfDdjYkmj8wWT3orVv5bFCVUfRFdCdUxATQdSOUPW50oE7f DJKa7kfYvPag/UmPEx5mfni0R4/MP2o0RrP3ZZk/sJGpm/ckwszzbd5Cp6uZcnaxeqYM W+ydMNVe2o80yGTjEGcChsuLXD0JwS/YoTojneMtbA2kYrBdUhbfZ5p8NCGegkWE5PPF 3CRlBR54N96pX8KoK6DiR8Y1EV7kjxQXWA4isncszImBSl2u8m+iG7wX24yw5BDOZMxq JHfB4hmIcYhUv8g42pRd1sc9dIqER/J+tMqiO+H4hyg3Vr1hgLHQkw8f/1zbIh9P1LlN csFQ== X-Gm-Message-State: AOAM531Op1r1OZuTkdKxV7rB+6XApMoRmMqzFjq79369UPNErRXH6z/v LXcd9ZsPZs3xZRfm9XEmyASWeDmWCSfgKD+J9sY= X-Google-Smtp-Source: ABdhPJyFC9Xx0kDsAPyX8eetKNDp9IFxU/2CcLh3lz+/X7cQduo1+KZkxLC4lpjTmYIPbbr07Tm476OF/6p5D4+fB2w= X-Received: by 2002:ac8:fec:: with SMTP id f41mr1166117qtk.186.1600881464396; Wed, 23 Sep 2020 10:17:44 -0700 (PDT) MIME-Version: 1.0 References: <20200923161253.2378-1-ludo@gnu.org> In-Reply-To: <20200923161253.2378-1-ludo@gnu.org> From: zimoun Date: Wed, 23 Sep 2020 19:17:33 +0200 Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) 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: -1.0 (-) Hi, On Wed, 23 Sep 2020 at 18:23, Ludovic Court=C3=A8s wrote: > Concretely, the following commands had no effect thus far: > > guix build python-itsdangerous --with-input=3Dpython=3Dpython2 > guix build hello --with-input=3Dgcc=3Dgcc-toolchain@10 > > In both cases, this is because the input we want to change is > an implicit input. This patch set fixes that, and it fixes > as a side effect. Awesome! Therefore, 'package-with-explicit-python' & co. are becoming obsolete (or almost), right? > This opens new possibilities. =E2=80=98--with-input=3Dpython=3Dpython2= =E2=80=99 is one > of them, but =E2=80=98--with-input=3Dgcc=3Dgcc-toolchain@10=E2=80=99 is n= ot (it fails > to build for obscure reasons that I=E2=80=99ll fix in =E2=80=98core-updat= es=E2=80=99, and > it rebuilds the world anyway, which is not practical). Another Rebuilding the world, maybe. :-) It is interesting in the HPC context where one would like use an "optimized" compiler, isn't? Thank you. I will give it a try for my use cases. :-) All the best, simon From unknown Sat Jun 14 19:15:02 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#43578] [PATCH 0/4] Rewriting implicit inputs with 'package-input-rewriting' & co. Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 23 Sep 2020 20:52:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 43578 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: zimoun Cc: 43578@debbugs.gnu.org Received: via spool by 43578-submit@debbugs.gnu.org id=B43578.16008942949006 (code B ref 43578); Wed, 23 Sep 2020 20:52:02 +0000 Received: (at 43578) by debbugs.gnu.org; 23 Sep 2020 20:51:34 +0000 Received: from localhost ([127.0.0.1]:38025 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kLBji-0002LB-9w for submit@debbugs.gnu.org; Wed, 23 Sep 2020 16:51:34 -0400 Received: from eggs.gnu.org ([209.51.188.92]:48104) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kLBje-0002Kq-Sc for 43578@debbugs.gnu.org; Wed, 23 Sep 2020 16:51:33 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:50458) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kLBjY-00016e-Cr; Wed, 23 Sep 2020 16:51:25 -0400 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=53464 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1kLBjW-0003HV-Gd; Wed, 23 Sep 2020 16:51:24 -0400 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: <20200923161253.2378-1-ludo@gnu.org> Date: Wed, 23 Sep 2020 22:51:21 +0200 In-Reply-To: (zimoun's message of "Wed, 23 Sep 2020 19:17:33 +0200") Message-ID: <87y2l0b4ja.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-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 (---) Hi! zimoun skribis: > On Wed, 23 Sep 2020 at 18:23, Ludovic Court=C3=A8s wrote: > >> Concretely, the following commands had no effect thus far: >> >> guix build python-itsdangerous --with-input=3Dpython=3Dpython2 >> guix build hello --with-input=3Dgcc=3Dgcc-toolchain@10 >> >> In both cases, this is because the input we want to change is >> an implicit input. This patch set fixes that, and it fixes >> as a side effect. > > Awesome! > > Therefore, 'package-with-explicit-python' & co. are becoming obsolete > (or almost), right? Good question, we=E2=80=99d have to check on a case-by-case basis. =E2=80=98package-input-rewriting=E2=80=99 is coarser-grain: it can potentia= lly rewrite =E2=80=98python=E2=80=99 dependencies deeper in the graph than =E2=80=98package-with-explicit-python=E2=80=99. >> This opens new possibilities. =E2=80=98--with-input=3Dpython=3Dpython2= =E2=80=99 is one >> of them, but =E2=80=98--with-input=3Dgcc=3Dgcc-toolchain@10=E2=80=99 is = not (it fails >> to build for obscure reasons that I=E2=80=99ll fix in =E2=80=98core-upda= tes=E2=80=99, and >> it rebuilds the world anyway, which is not practical). Another > > Rebuilding the world, maybe. :-) It is interesting in the HPC context > where one would like use an "optimized" compiler, isn't? Like I wrote, =E2=80=98--with-input=3Dgcc=3Dgcc-toolchain@10=E2=80=99 (or s= imilar) isn=E2=80=99t practical: you=E2=80=99d have to rebuild the world. What I envision for the use case where you want to build a specific package set with a different toolchain is to have a =E2=80=98--with-toolchain=3DPACKAGE=3DTOOLCHAIN=E2=80=99 option. That woul= d rebuild PACKAGE with TOOLCHAIN. Then it would either rebuild all its dependents (as per =E2=80=98--with-input=E2=80=99) or graft the rebuilt package (as per =E2=80= =98--with-graft=E2=80=99). The latter may not always be a viable option though, so I don=E2=80=99t kno= w. In fact I think it would be nice if the graft vs. rebuild choice could be made independently for all the transformation options. > Thank you. I will give it a try for my use cases. :-) Awesome, let me know how it goes! Thank you, Ludo=E2=80=99. From unknown Sat Jun 14 19:15:02 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#43578] [PATCH 0/4] Rewriting implicit inputs with 'package-input-rewriting' & co. Resent-From: Efraim Flashner Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 24 Sep 2020 06:30:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 43578 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: 43578@debbugs.gnu.org, zimoun Received: via spool by 43578-submit@debbugs.gnu.org id=B43578.160092897617216 (code B ref 43578); Thu, 24 Sep 2020 06:30:02 +0000 Received: (at 43578) by debbugs.gnu.org; 24 Sep 2020 06:29:36 +0000 Received: from localhost ([127.0.0.1]:38503 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kLKl6-0004Tb-8Q for submit@debbugs.gnu.org; Thu, 24 Sep 2020 02:29:36 -0400 Received: from flashner.co.il ([178.62.234.194]:54110) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kLKl4-0004TP-4N for 43578@debbugs.gnu.org; Thu, 24 Sep 2020 02:29:35 -0400 Received: from localhost (unknown [31.210.181.177]) by flashner.co.il (Postfix) with ESMTPSA id 3F93840045; Thu, 24 Sep 2020 06:29:28 +0000 (UTC) Date: Thu, 24 Sep 2020 09:28:55 +0300 From: Efraim Flashner Message-ID: <20200924062855.GJ896@E5400> References: <20200923161253.2378-1-ludo@gnu.org> <87y2l0b4ja.fsf@gnu.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="g3RkK9jYN81zD2N+" Content-Disposition: inline In-Reply-To: <87y2l0b4ja.fsf@gnu.org> X-PGP-Key-ID: 0x41AAE7DCCA3D8351 X-PGP-Key: https://flashner.co.il/~efraim/efraim_flashner.asc X-PGP-Fingerprint: A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351 X-Spam-Score: 3.6 (+++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: On Wed, Sep 23, 2020 at 10:51:21PM +0200, Ludovic =?UTF-8?Q?Court=C3=A8s?= wrote: > Hi! > > zimoun skribis: > > > On Wed, 23 Sep 2020 at 18:23, Ludovic =?UTF-8?Q?Court=C3=A8s?= wrote: > > > [...] Content analysis details: (3.6 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 3.6 RCVD_IN_SBL_CSS RBL: Received via a relay in Spamhaus SBL-CSS [31.210.181.177 listed in zen.spamhaus.org] -0.0 SPF_PASS SPF: sender matches SPF record -0.0 SPF_HELO_PASS SPF: HELO matches SPF record 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.6 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: On Wed, Sep 23, 2020 at 10:51:21PM +0200, Ludovic =?UTF-8?Q?Court=C3=A8s?= wrote: > Hi! > > zimoun skribis: > > > On Wed, 23 Sep 2020 at 18:23, Ludovic =?UTF-8?Q?Court=C3=A8s?= wrote: > > > [...] Content analysis details: (2.6 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 3.6 RCVD_IN_SBL_CSS RBL: Received via a relay in Spamhaus SBL-CSS [31.210.181.177 listed in zen.spamhaus.org] -0.0 SPF_PASS SPF: sender matches SPF record -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -1.0 MAILING_LIST_MULTI Multiple indicators imply a widely-seen list manager --g3RkK9jYN81zD2N+ Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Sep 23, 2020 at 10:51:21PM +0200, Ludovic Court=C3=A8s wrote: > Hi! >=20 > zimoun skribis: >=20 > > On Wed, 23 Sep 2020 at 18:23, Ludovic Court=C3=A8s wrote: > > > >> Concretely, the following commands had no effect thus far: > >> > >> guix build python-itsdangerous --with-input=3Dpython=3Dpython2 > >> guix build hello --with-input=3Dgcc=3Dgcc-toolchain@10 > >> > >> In both cases, this is because the input we want to change is > >> an implicit input. This patch set fixes that, and it fixes > >> as a side effect. > > > > Awesome! > > > > Therefore, 'package-with-explicit-python' & co. are becoming obsolete > > (or almost), right? >=20 > Good question, we=E2=80=99d have to check on a case-by-case basis. > =E2=80=98package-input-rewriting=E2=80=99 is coarser-grain: it can potent= ially rewrite > =E2=80=98python=E2=80=99 dependencies deeper in the graph than > =E2=80=98package-with-explicit-python=E2=80=99. >=20 IIRC part of the reason for python-minimal was to build tcl/tk and xorg. We don't really want to rebuild deep enough to rebuild xorg with python2. I'm struggling to find a use-case but going as deep as sqlite shouldn't be a problem. > >> This opens new possibilities. =E2=80=98--with-input=3Dpython=3Dpython= 2=E2=80=99 is one > >> of them, but =E2=80=98--with-input=3Dgcc=3Dgcc-toolchain@10=E2=80=99 i= s not (it fails > >> to build for obscure reasons that I=E2=80=99ll fix in =E2=80=98core-up= dates=E2=80=99, and > >> it rebuilds the world anyway, which is not practical). Another > > > > Rebuilding the world, maybe. :-) It is interesting in the HPC context > > where one would like use an "optimized" compiler, isn't? >=20 > Like I wrote, =E2=80=98--with-input=3Dgcc=3Dgcc-toolchain@10=E2=80=99 (or= similar) isn=E2=80=99t > practical: you=E2=80=99d have to rebuild the world. >=20 > What I envision for the use case where you want to build a specific > package set with a different toolchain is to have a > =E2=80=98--with-toolchain=3DPACKAGE=3DTOOLCHAIN=E2=80=99 option. That wo= uld rebuild PACKAGE > with TOOLCHAIN. Then it would either rebuild all its dependents (as per > =E2=80=98--with-input=E2=80=99) or graft the rebuilt package (as per =E2= =80=98--with-graft=E2=80=99). > The latter may not always be a viable option though, so I don=E2=80=99t k= now. >=20 > In fact I think it would be nice if the graft vs. rebuild choice could > be made independently for all the transformation options. >=20 > > Thank you. I will give it a try for my use cases. :-) >=20 > Awesome, let me know how it goes! >=20 > Thank you, > Ludo=E2=80=99. >=20 >=20 >=20 --=20 Efraim Flashner =D7=90=D7=A4=D7=A8=D7=99=D7=9D = =D7=A4=D7=9C=D7=A9=D7=A0=D7=A8 GPG key =3D A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351 Confidentiality cannot be guaranteed on emails sent or received unencrypted --g3RkK9jYN81zD2N+ Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEoov0DD5VE3JmLRT3Qarn3Mo9g1EFAl9sPKQACgkQQarn3Mo9 g1Fu6xAAh7JtMVg1xzVgoU4pduR4SWbkO98gA7O/mIK4JhcU84vfKzX8eUFsMSMy upMt+3j2JFLtlkRSGqSpk/aUdfXwUdVvqqSuwuv67K7l825aIbEwFlFmw9HX2whP iUDtSTE4z6e/iV1XHr1WJbAICFB3LfJeFLJXQyn81b+7FTmjwTb17sS4Z5J8uVAd mJlfbncEczSh1Yw5i4x/bjY6xms6W0jLTFYpWv2VMPThc6MrJUBhnY+35gEz7GBV HPxjEHqaVegXlJ3F6ic2wYzWV2eqnmhxeLH3PG3EdiAQJ2LUEFVf5qB0BplZvy4D HSrklHmtsNIvn5XEoeMwNWEIAoTUYoyKqMsEwM56tvqPkXUB+ye2XkjEZiX141jC 2oFb9HQHAZyVWMUy4epJ3hSzlfU9WXU+ey+nwmsSz5Lc2q4MXMxXIvfwP6JF+mhF IjHELmInaK6IlVWjE2u4ZkO9fCgugqhbZe3wtU4lE8IhdskKiogumvRbgbTKx3Rr nk1I86K62kDvuvudLTvSPtmXIC+LL12c1ivSx/UrIhZJTVaTBWaLqO6z5wTNcJOo bzq2geSYoBDhWcv7O7e5cxircqOQKWTWaDaRkbJII5jMgLrnz0Au/JsMqQikVJW0 YgKgRWbxTjbeWitwFJm8NzDcS21GTC0rU94KGcuiyMOFj27szqA= =/u5Q -----END PGP SIGNATURE----- --g3RkK9jYN81zD2N+-- From unknown Sat Jun 14 19:15:02 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#43578] [PATCH 0/4] Rewriting implicit inputs with 'package-input-rewriting' & co. Resent-From: zimoun Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 25 Sep 2020 22:39:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 43578 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: 43578@debbugs.gnu.org Received: via spool by 43578-submit@debbugs.gnu.org id=B43578.160107349513639 (code B ref 43578); Fri, 25 Sep 2020 22:39:01 +0000 Received: (at 43578) by debbugs.gnu.org; 25 Sep 2020 22:38:15 +0000 Received: from localhost ([127.0.0.1]:45474 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kLwM2-0003Xv-Nx for submit@debbugs.gnu.org; Fri, 25 Sep 2020 18:38:14 -0400 Received: from mail-wm1-f65.google.com ([209.85.128.65]:53725) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kLwLz-0003Xe-H8 for 43578@debbugs.gnu.org; Fri, 25 Sep 2020 18:38:13 -0400 Received: by mail-wm1-f65.google.com with SMTP id x23so788775wmi.3 for <43578@debbugs.gnu.org>; Fri, 25 Sep 2020 15:38:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-transfer-encoding; bh=sotWYa/FgOmjmQqJyrloJF0CD/5nbk+2icWXZFoSDEQ=; b=DZB9LltwqPgb4JIsBc0YVanhvZPg94Tp9GfM8d3TGLW06nPDAwhW77a4l7kB13L2R3 6vscs1fkxqi6MEZe3/BlAfRbhtSG7zf+uEbrWmDpa5hejBpwxmkrkMdXI2/aWeO5kSSF FP8QiB5oG6ZhwasOHmjgXQUZbxdbKAJMzKm+flt8SwE7i/LZiZZYjkjg1AdBMCl/cQ0z dRUFzTKKQcakO7AVkAPANwiuWy9RfA3VAIWM83lQiKUIbsXWGCBtu0C+HmadF03vc7ta clcAj+NSwbZpTtK8Enei3Iw6ilmLlB6zjVTc+m9wfVOWH3Te8b3aDBOLCdfI75JVN23e KqAA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-transfer-encoding; bh=sotWYa/FgOmjmQqJyrloJF0CD/5nbk+2icWXZFoSDEQ=; b=XZxdLom0fvJCdhNLK3qXH5yQJZY0FpzaLuyhP+8MkjbSporOBmcii0MJpga36vAEAJ S0k4Dm9UgvUC96+dexkOHiRz9MEofr8REqY7t39DqSuzUSGLk0vd1sEyXIoCX3M/9HfL 1YXj/kXMOCgYg6xUW/lF0h50U7lLbFBccoQ4vww7OhlNRvSSjTCgcThCLRebvjyCUZcf yaeztdMsBJ6sPIvgeQXjrtjod19ltXLbMWF54vqA7lFfj49TO9pszQLFexdIfAnzTpjW /ReHbxoNda04MK32epOxjCGPZJ3UOYHMCPLMVlhEO7z9Oe8OLYX0B4pC1eroMphbxPs5 aXHQ== X-Gm-Message-State: AOAM530dMXZ6Bxbqq6ukeWWd5gReGbOuplAWABaCUTgckpWZwHX34ZJO Y0ipYPuuzBhhid5UYi83c3DJRq7+HQo= X-Google-Smtp-Source: ABdhPJzNPcCbU8JioEp3cRDqfLn/jZ37XDpKMX6QJHT44xQoln+iuZ/QF/EbG4S5oYSGhziKLYfucw== X-Received: by 2002:a7b:cb82:: with SMTP id m2mr790038wmi.56.1601073485181; Fri, 25 Sep 2020 15:38:05 -0700 (PDT) Received: from lili ([2a01:e0a:59b:9120:65d2:2476:f637:db1e]) by smtp.gmail.com with ESMTPSA id x16sm4158126wrq.62.2020.09.25.15.38.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 25 Sep 2020 15:38:04 -0700 (PDT) From: zimoun References: <20200923161253.2378-1-ludo@gnu.org> Date: Sat, 26 Sep 2020 00:38:03 +0200 In-Reply-To: <20200923161253.2378-1-ludo@gnu.org> ("Ludovic =?UTF-8?Q?Court=C3=A8s?="'s message of "Wed, 23 Sep 2020 18:12:53 +0200") Message-ID: <86eemptrck.fsf@gmail.com> 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: 0.0 (/) 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: -1.0 (-) Hi Ludo, On Wed, 23 Sep 2020 at 18:12, Ludovic Court=C3=A8s wrote: > Concretely, the following commands had no effect thus far: > > guix build python-itsdangerous --with-input=3Dpython=3Dpython2 > guix build hello --with-input=3Dgcc=3Dgcc-toolchain@10 > > In both cases, this is because the input we want to change is > an implicit input. This patch set fixes that, and it fixes > as a side effect. Maybe I am doing wrong and I miss something. For example, I want to build the package =E2=80=99emacs-helm=E2=80=99 =E2= =80=93which does not (directly) depends on the package =E2=80=99emacs=E2=80=99=E2=80=93 using th= e package =E2=80=99emacs-next=E2=80=99 (changing the Emacs VM from 27 to 28 in this c= ase). --8<---------------cut here---------------start------------->8--- $ ./pre-inst-env guix build emacs emacs-next /gnu/store/7kr0pg7gwhc31q4iq5vbnm5n99srhp84-emacs-next-28.0.50.1-0.2ea3466 /gnu/store/q3c6y4ccj3li5gfdcbyz24n466fnipp1-emacs-27.1 $ cat /tmp/manif.scm (specifications->manifest '("emacs-helm")) $ ./pre-inst-env guix build -m /tmp/manif.scm /gnu/store/ka9lph0hpzaky0sa52zf09469apkhb68-emacs-helm-3.6.5 $ ./pre-inst-env guix build -m /tmp/manif.scm --with-input=3Demacs=3Demacs-= next /gnu/store/ka9lph0hpzaky0sa52zf09469apkhb68-emacs-helm-3.6.5 --8<---------------cut here---------------end--------------->8--- I miss why the hash is the same. I was expecting a different one, as with your =E2=80=99hello=E2=80=99 example (that I reproduce exactly). What= do I miss? Note it is the same with: --8<---------------cut here---------------start------------->8--- $ ./pre-inst-env guix build emacs-helm --with-input=3Demacs=3Demacs-next /gnu/store/ka9lph0hpzaky0sa52zf09469apkhb68-emacs-helm-3.6.5 --8<---------------cut here---------------end--------------->8--- Well, I am trying to provide an example to [1] because your patch set supersedes it, somehow. [1] (I have not yet tried the build transformation at the manifest level.) All the best, simon From unknown Sat Jun 14 19:15:02 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#43578] [PATCH 0/4] Rewriting implicit inputs with 'package-input-rewriting' & co. Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 26 Sep 2020 13:54:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 43578 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: zimoun Cc: 43578@debbugs.gnu.org Received: via spool by 43578-submit@debbugs.gnu.org id=B43578.160112844116901 (code B ref 43578); Sat, 26 Sep 2020 13:54:01 +0000 Received: (at 43578) by debbugs.gnu.org; 26 Sep 2020 13:54:01 +0000 Received: from localhost ([127.0.0.1]:46151 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kMAeG-0004OW-SN for submit@debbugs.gnu.org; Sat, 26 Sep 2020 09:54:01 -0400 Received: from eggs.gnu.org ([209.51.188.92]:45424) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kMAeF-0004OK-OX for 43578@debbugs.gnu.org; Sat, 26 Sep 2020 09:54:00 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:60296) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kMAeA-0003xd-DR; Sat, 26 Sep 2020 09:53:54 -0400 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=36168 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1kMAe9-0004DO-72; Sat, 26 Sep 2020 09:53:53 -0400 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: <20200923161253.2378-1-ludo@gnu.org> <86eemptrck.fsf@gmail.com> Date: Sat, 26 Sep 2020 15:53:51 +0200 In-Reply-To: <86eemptrck.fsf@gmail.com> (zimoun's message of "Sat, 26 Sep 2020 00:38:03 +0200") Message-ID: <871riohceo.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-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 (---) Hi zimoun, zimoun skribis: > I miss why the hash is the same. I was expecting a different one, as > with your =E2=80=99hello=E2=80=99 example (that I reproduce exactly). Wh= at do I miss? > > Note it is the same with: > > $ ./pre-inst-env guix build emacs-helm --with-input=3Demacs=3Demacs-next > /gnu/store/ka9lph0hpzaky0sa52zf09469apkhb68-emacs-helm-3.6.5 That=E2=80=99s because =E2=80=98emacs-helm=E2=80=99 depends on =E2=80=98ema= cs-minimal=E2=80=99, not =E2=80=98emacs=E2=80=99: --8<---------------cut here---------------start------------->8--- $ guix graph --path -t bag emacs-helm emacs guix graph: error: no path from 'emacs-helm@3.6.5' to 'emacs@27.1' $ guix graph --path -t bag emacs-helm emacs-minimal=20 emacs-helm@3.6.5 emacs-minimal@27.1 --8<---------------cut here---------------end--------------->8--- Does it work for you if you do =E2=80=98--with-input=3Demacs-minimal=3Demac= s-next=E2=80=99? HTH, Ludo=E2=80=99. From unknown Sat Jun 14 19:15:02 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#43578] [PATCH 0/4] Rewriting implicit inputs with 'package-input-rewriting' & co. Resent-From: zimoun Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 26 Sep 2020 16:05:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 43578 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: 43578@debbugs.gnu.org Received: via spool by 43578-submit@debbugs.gnu.org id=B43578.160113626130865 (code B ref 43578); Sat, 26 Sep 2020 16:05:01 +0000 Received: (at 43578) by debbugs.gnu.org; 26 Sep 2020 16:04:21 +0000 Received: from localhost ([127.0.0.1]:47630 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kMCgO-00081l-P5 for submit@debbugs.gnu.org; Sat, 26 Sep 2020 12:04:21 -0400 Received: from mail-qt1-f196.google.com ([209.85.160.196]:42641) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kMCgM-00081X-Ir for 43578@debbugs.gnu.org; Sat, 26 Sep 2020 12:04:18 -0400 Received: by mail-qt1-f196.google.com with SMTP id y11so4852493qtn.9 for <43578@debbugs.gnu.org>; Sat, 26 Sep 2020 09:04:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=zRBFnKqUgw1NXewavCw8XnyWQeVrJ/rUXhmiEnM4tMI=; b=TfXjt5P6duIyzgr2PfUGMlS6Tr1+px2pRvBWr3sAyEjjh5vAoA/6WzOQO5lGGNhXdx sNSemP7c1ouKflhr3kat7NBhYFTF1y7ECFwngtqh8KrFSOToENqaErEVJxOsnKE5mTL7 emUwdSrHjfdQsdBz0Bn5wlagQq+klpJItbYvUnGCfkf7aBwq5wCTNgMjPWDQyei3bQdw RLCpYukjonDJrGE8VdQk7yrZkD+g5kh513VjoK8Y02OOcy/S45g/Gx7WkbmalSjWgZwK l8ZV4S5lDg3IYZeYg6Bqa8RGUoXA3zhzwt/sygKathRjruEhGPJMwruuKUz0pkFW1NRH yeWA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=zRBFnKqUgw1NXewavCw8XnyWQeVrJ/rUXhmiEnM4tMI=; b=Xg7yxI3MmbPN5SivJP8QmOr3utMZDzmKJ0/v6FU5GC1CG14aF4+uvaGy2W6Wy5KXfM aM7UXxNoCviJoDgT5eDNFIjGDZDyMIlq++xiLris/WiwkissMqNc1d4m1QlzPbcuE7CG 6CNrTjqitjjyZma4mue6+OpXOPa9jNYho/YYfiTuJa3wcs5gfAKuAU8k20efsCcohfHW rJqEwGVrQGExHpw8+kwTs+6N0DHvVnlCH0ysrjxd6na9+NU0vvEAtdIQI+cmJYc4YCbW MaBERkkFIZpiUtaLIaRDNo24uwaO6i5d/0aAyTtqrm1CcnIUDEziEr6+X6C23HnQvGmi CY6A== X-Gm-Message-State: AOAM533o+yNJjeB9ixXKVbcWgd283dCDeu0xzxfw0Kd3I17+smTXI2uN trR6ZUSO+pNe5sG67fpshBMWS1DazWS0WnnccUc= X-Google-Smtp-Source: ABdhPJzZrKbq4DKVFJo4DvEdZ1OUX8dBH0uCdQMOBwSs74zK29hYNuy3LZDaKvfeBt3/1q9GpvepjLI/6gW9qsCei8E= X-Received: by 2002:ac8:5317:: with SMTP id t23mr5252178qtn.354.1601136252981; Sat, 26 Sep 2020 09:04:12 -0700 (PDT) MIME-Version: 1.0 References: <20200923161253.2378-1-ludo@gnu.org> <86eemptrck.fsf@gmail.com> <871riohceo.fsf@gnu.org> In-Reply-To: <871riohceo.fsf@gnu.org> From: zimoun Date: Sat, 26 Sep 2020 18:04:00 +0200 Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) 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: -1.0 (-) On Sat, 26 Sep 2020 at 15:53, Ludovic Court=C3=A8s wrote: > Does it work for you if you do =E2=80=98--with-input=3Demacs-minimal=3Dem= acs-next=E2=80=99? Ahah! Stupid me! :-) Yes it works for me. And it does what I wanted when discussing the lengthy and controversial package parameters. Thank you! Cheers, simon From debbugs-submit-bounces@debbugs.gnu.org Mon Oct 05 03:56:55 2020 Received: (at control) by debbugs.gnu.org; 5 Oct 2020 07:56:55 +0000 Received: from localhost ([127.0.0.1]:47719 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kPLMc-0001fM-R8 for submit@debbugs.gnu.org; Mon, 05 Oct 2020 03:56:55 -0400 Received: from eggs.gnu.org ([209.51.188.92]:52054) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kPLMb-0001f9-Lf for control@debbugs.gnu.org; Mon, 05 Oct 2020 03:56:53 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:54180) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kPLMW-0003zT-A3 for control@debbugs.gnu.org; Mon, 05 Oct 2020 03:56:48 -0400 Received: from [2001:660:6102:320:e120:2c8f:8909:cdfe] (port=33896 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1kPLMU-0004xo-7W for control@debbugs.gnu.org; Mon, 05 Oct 2020 03:56:46 -0400 Date: Mon, 05 Oct 2020 09:56:44 +0200 Message-Id: <87362t6r7n.fsf@gnu.org> To: control@debbugs.gnu.org From: =?utf-8?Q?Ludovic_Court=C3=A8s?= Subject: control message for bug #43578 MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) 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: -3.3 (---) tags 43578 fixed close 43578 quit