diff options
author | Liliana Marie Prikler <liliana.prikler@gmail.com> | 2023-09-07 20:42:02 +0200 |
---|---|---|
committer | Liliana Marie Prikler <liliana.prikler@gmail.com> | 2023-09-07 20:42:03 +0200 |
commit | 20e3f3e1151b2f22ae7fb5aa8764148654f35090 (patch) | |
tree | 3f6af3a73f4548b8f6564a31984abeeefd60b0ef /guix | |
parent | 965e2d6eb90826181471b834437ac68dcb9217cb (diff) | |
parent | 451ba2e5bb523c18a2ccc941df47b598c48ef57e (diff) | |
download | guix-20e3f3e1151b2f22ae7fb5aa8764148654f35090.tar guix-20e3f3e1151b2f22ae7fb5aa8764148654f35090.tar.gz |
Merge branch 'master' into gnome-team
Diffstat (limited to 'guix')
-rw-r--r-- | guix/git.scm | 5 | ||||
-rw-r--r-- | guix/gnu-maintenance.scm | 5 | ||||
-rw-r--r-- | guix/import/utils.scm | 9 | ||||
-rw-r--r-- | guix/packages.scm | 3 | ||||
-rw-r--r-- | guix/scripts/pull.scm | 1 | ||||
-rw-r--r-- | guix/scripts/time-machine.scm | 15 |
6 files changed, 30 insertions, 8 deletions
diff --git a/guix/git.scm b/guix/git.scm index dbc3b7caa7..1cb87a4560 100644 --- a/guix/git.scm +++ b/guix/git.scm @@ -360,6 +360,11 @@ dynamic extent of EXP." (define (reference-available? repository ref) "Return true if REF, a reference such as '(commit . \"cabba9e\"), is definitely available in REPOSITORY, false otherwise." + ;; Note: this must not rely on 'resolve-reference', as that procedure always + ;; resolves the references for branch names such as master. The semantic we + ;; want here is that unless the reference is exact (e.g. a commit), the + ;; reference should not be considered available, as it could have changed on + ;; the remote. (match ref ((or ('commit . commit) ('tag-or-commit . (? commit-id? commit))) diff --git a/guix/gnu-maintenance.scm b/guix/gnu-maintenance.scm index ee6e0db747..5a84fcb117 100644 --- a/guix/gnu-maintenance.scm +++ b/guix/gnu-maintenance.scm @@ -600,7 +600,7 @@ rewritten to something like links))) ;; Retrieve the item having the largest version. (if (null? candidates) - (error "no candidates found in rewrite-url") + parents (cons (cdr (first (sort candidates (lambda (x y) (version>? (car x) @@ -980,7 +980,8 @@ the directory containing its source tarball. Optionally include a VERSION string to fetch a specific version." (let* ((uri (string->uri (match (origin-uri (package-source package)) - ((? (cut string-prefix? "mirror://" <>) url) + ((and (? string?) + (? (cut string-prefix? "mirror://" <>) url)) ;; Retrieve the authoritative HTTP URL from a mirror. (http-url? url)) ((? string? url) url) diff --git a/guix/import/utils.scm b/guix/import/utils.scm index fcd7707482..0cf52cdbde 100644 --- a/guix/import/utils.scm +++ b/guix/import/utils.scm @@ -342,7 +342,14 @@ LENGTH characters." (let ((pattern (make-regexp "([A-Z][a-z]+[A-Z]|[a-z]+[A-Z])"))) (match (list-matches pattern word) (() word) - (_ (string-append "@code{" word "}"))))))))) + ((m . rest) + ;; Do not include leading or trailing punctuation. + (let* ((last-text (or (and=> (string-skip-right word char-set:punctuation) 1+) + (string-length word))) + (inner (substring word (match:start m) last-text)) + (pre (string-take word (match:start m))) + (post (substring word last-text (string-length word)))) + (string-append pre "@code{" inner "}" post)))))))))) (words (string-tokenize (string-trim-both description) (char-set-complement diff --git a/guix/packages.scm b/guix/packages.scm index ba98bb0fb4..f70fad695e 100644 --- a/guix/packages.scm +++ b/guix/packages.scm @@ -761,7 +761,8 @@ object." (lambda (port) (go-to-location port line column) (match (read port) - (('package inits ...) + ((or ('package inits ...) + ('package/inherit _ inits ...)) (let ((field (assoc field inits))) (match field ((_ value) diff --git a/guix/scripts/pull.scm b/guix/scripts/pull.scm index 759c3a94a3..1904a6913a 100644 --- a/guix/scripts/pull.scm +++ b/guix/scripts/pull.scm @@ -786,6 +786,7 @@ Use '~/.config/guix/channels.scm' instead.")) (let ((url (or url (channel-url c)))) (match ref ((or ('commit . commit) + ('tag . commit) ('tag-or-commit . commit)) (channel (inherit c) (url url) (commit commit) (branch #f))) diff --git a/guix/scripts/time-machine.scm b/guix/scripts/time-machine.scm index 87000d82ec..3ecf735acb 100644 --- a/guix/scripts/time-machine.scm +++ b/guix/scripts/time-machine.scm @@ -164,13 +164,20 @@ Execute COMMAND ARGS... in an older version of Guix.\n")) (define (validate-guix-channel channels) "Finds the Guix channel among CHANNELS, and validates that REF as captured from the closure, a git reference specification such as a commit hash -or tag associated to CHANNEL, is valid and new enough to satisfy the 'guix -time-machine' requirements. A `formatted-message' condition is raised -otherwise." +or tag associated to the channel, is valid and new enough to satisfy the 'guix +time-machine' requirements. If the captured REF variable is #f, the reference +validate is the one of the Guix channel found in CHANNELS. A +`formatted-message' condition is raised otherwise." (let* ((guix-channel (find guix-channel? channels)) + (guix-channel-commit (channel-commit guix-channel)) + (guix-channel-branch (channel-branch guix-channel)) + (guix-channel-ref (if guix-channel-commit + `(tag-or-commit . ,guix-channel-commit) + `(branch . ,guix-channel-branch))) + (reference (or ref guix-channel-ref)) (checkout commit relation (update-cached-checkout (channel-url guix-channel) - #:ref (or ref '()) + #:ref reference #:starting-commit %oldest-possible-commit))) (unless (memq relation '(ancestor self)) |