summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZheng Junjie <873216071@qq.com>2021-04-13 23:00:10 +0800
committerGuix Patches Tester <>2021-04-13 17:36:14 +0100
commit5c4c87792f41b93f3e64d4835fc88d087f0bf3c0 (patch)
tree7e535318829b426280651cc7d9ec585e18a96260
parentb5607d830c917c49ca9a7993962bd2b7c7be953c (diff)
downloadguix-patches-5c4c87792f41b93f3e64d4835fc88d087f0bf3c0.tar
guix-patches-5c4c87792f41b93f3e64d4835fc88d087f0bf3c0.tar.gz
gnu: transformations: fix with-latest option for git source package.series-7597
gnu/transformations.scm: (transform-package-latest): (package-with-latest-upstream): use git-checkout if p is a git source package.
-rw-r--r--guix/transformations.scm8
1 files changed, 7 insertions, 1 deletions
diff --git a/guix/transformations.scm b/guix/transformations.scm
index 4e9260350c..559e408c37 100644
--- a/guix/transformations.scm
+++ b/guix/transformations.scm
@@ -1,5 +1,6 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2016, 2017, 2018, 2019, 2020, 2021 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright @ 2021 Zheng Junjie <873216071@qq.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -26,6 +27,7 @@
#:autoload (guix git-download) (git-reference? git-reference-url)
#:autoload (guix git) (git-checkout git-checkout? git-checkout-url)
#:autoload (guix upstream) (package-latest-release*
+ upstream-source-urls
upstream-source-version
upstream-source-signature-urls)
#:use-module (guix utils)
@@ -537,7 +539,11 @@ are replaced by their latest upstream version."
(package
(inherit p)
(version (upstream-source-version source))
- (source source))))))
+ (source (cond ((false-if-exception (package-git-url p))
+ (git-checkout
+ (url (car (upstream-source-urls source)))
+ (recursive? #t)))
+ (else source))))))))
(define rewrite
(package-input-rewriting/spec