summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorSarah Morgensen <iskarian@mgsn.dev>2022-01-05 14:07:50 +0000
committerLudovic Courtès <ludo@gnu.org>2022-01-06 16:27:30 +0100
commit9f526f5dad5f4af69d158c50369e182305147f3b (patch)
treedac4605f2ddbd7dae4a1201cd045479ce44ba8d7 /tests
parent1c32b4c965cd9ea19043271a91b6522eef3a7ade (diff)
downloadguix-patches-9f526f5dad5f4af69d158c50369e182305147f3b.tar
guix-patches-9f526f5dad5f4af69d158c50369e182305147f3b.tar.gz
upstream: Support updating and fetching 'git-fetch' origins.
Updaters need to be modified to return 'git-reference' objects. This patch modifies the 'generic-git' and 'minetest' updater, but others might need to be modified as well. * guix/git.scm (git-reference->git-checkout): New procedure. * guix/upstream.scm (package-update/git-fetch): New procedure. (<upstream-source>)[urls]: Document it can be a 'git-reference'. (%method-updates): Add 'git-fetch' mapping. (update-package-source): Support 'git-reference' sources. (upstream-source-compiler/url-fetch): Split off from ... (upstream-source-compiler): ... this, and call ... (upstream-source-compiler/git-fetch): ... this new procedure if the URL field contains a 'git-reference'. * guix/import/git.scm (latest-git-tag-version): Always return two values and document that the tag is returned as well. (latest-git-release)[urls]: Use the 'git-reference' instead of the repository URL. * guix/import/minetest.scm (latest-minetest-release)[urls]: Don't wrap the 'git-reference' in a list. * tests/minetest.scm (upstream-source->sexp): Adjust to new convention. Co-authored-by: Maxime Devos <maximedevos@telenet.be> Signed-off-by: Ludovic Courtès <ludo@gnu.org>
Diffstat (limited to 'tests')
-rw-r--r--tests/minetest.scm7
1 files changed, 3 insertions, 4 deletions
diff --git a/tests/minetest.scm b/tests/minetest.scm
index 77b9aa928f..cbb9e83889 100644
--- a/tests/minetest.scm
+++ b/tests/minetest.scm
@@ -387,10 +387,9 @@ during a dynamic extent where that package is available on ContentDB."
;; Update detection
(define (upstream-source->sexp upstream-source)
- (define urls (upstream-source-urls upstream-source))
- (unless (= 1 (length urls))
- (error "only a single URL is expected"))
- (define url (first urls))
+ (define url (upstream-source-urls upstream-source))
+ (unless (git-reference? url)
+ (error "a <git-reference> is expected"))
`(,(upstream-source-package upstream-source)
,(upstream-source-version upstream-source)
,(git-reference-url url)