guix_mirror_bot pushed a commit to branch master
in repository guix.
commit f3d73553cdf50da0a20b8993f115483f82f4121f
Author: Maxim Cournoyer <[email protected]>
AuthorDate: Thu Jan 29 13:46:47 2026 +0900
transformations: Fix `recursive?' inheritance for `with-git-url'.
* guix/transformations.scm (transform-package-source-git-url): Use the
second
value of `package-git-url+recursive?'.
* tests/transformations.scm
("options->transformation, with-git-url, recursive? inheritance"): New test.
Change-Id: Ifd89bf1b0267f2b080b872cc7b318b9ae3706422
---
guix/transformations.scm | 4 +++-
tests/transformations.scm | 17 +++++++++++++++++
2 files changed, 20 insertions(+), 1 deletion(-)
diff --git a/guix/transformations.scm b/guix/transformations.scm
index 0cad18ba6e..a9dd18b7e3 100644
--- a/guix/transformations.scm
+++ b/guix/transformations.scm
@@ -356,7 +356,9 @@ a checkout of the Git repository at the given URL."
(origin-uri (package-source old))))
(recursive? (if (or (git-checkout? uri)
(git-reference? uri))
- (package-git-url+recursive? old)
+ (let ((_ recursive?
+
(package-git-url+recursive? old)))
+ recursive?)
#t)))
(package
(inherit old)
diff --git a/tests/transformations.scm b/tests/transformations.scm
index 1db54a0e19..82c3d2a532 100644
--- a/tests/transformations.scm
+++ b/tests/transformations.scm
@@ -1,6 +1,7 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2016-2017, 2019-2024, 2026 Ludovic Courtès <[email protected]>
;;; Copyright © 2021 Marius Bakke <[email protected]>
+;;; Copyright © 2026 Maxim Cournoyer <[email protected]>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -372,6 +373,22 @@
((("x" dep3))
(map package-source (list dep1 dep3)))))))))))
+(test-equal "options->transformation, with-git-url, recursive? inheritance"
+ (git-checkout (url "https://example2.org")
+ (recursive? #f))
+ (let* ((p (dummy-package "chbouib"
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://example1.org")
+ (commit "cabba9e")
+ (recursive? #f)))
+ (sha256 #f)))))
+ (t (options->transformation
+ '((with-git-url . "chbouib=https://example2.org")))))
+ (let ((new (t p)))
+ (package-source new))))
+
(define* (depends-on-toolchain? p #:optional (toolchain "gcc-toolchain"))
"Return true if P depends on TOOLCHAIN instead of the default tool chain."
(define toolchain-packages