diff options
author | Liliana Marie Prikler <liliana.prikler@gmail.com> | 2023-08-26 07:08:03 +0200 |
---|---|---|
committer | Liliana Marie Prikler <liliana.prikler@gmail.com> | 2023-08-26 07:08:03 +0200 |
commit | 9d074e16c7a9879d67c348c7b2d70b725adfbdfa (patch) | |
tree | c4c8dc52508717b3b7aa7c988924a03aa6eb83d8 /guix/scripts/pull.scm | |
parent | ca7e310f7ac32354b2e693e9a0f783320952a8fc (diff) | |
parent | eeb71d778f149834015858467fbeeb1276d96d1d (diff) |
Merge branch 'master' into emacs-team
Diffstat (limited to 'guix/scripts/pull.scm')
-rw-r--r-- | guix/scripts/pull.scm | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/guix/scripts/pull.scm b/guix/scripts/pull.scm index ecd264d3fa..759c3a94a3 100644 --- a/guix/scripts/pull.scm +++ b/guix/scripts/pull.scm @@ -85,6 +85,9 @@ Download and deploy the latest version of Guix.\n")) (display (G_ " -C, --channels=FILE deploy the channels defined in FILE")) (display (G_ " + -q, --no-channel-files + inhibit loading of user and system 'channels.scm'")) + (display (G_ " --url=URL download \"guix\" channel from the Git repository at URL")) (display (G_ " --commit=COMMIT download the specified \"guix\" channel COMMIT")) @@ -133,6 +136,9 @@ Download and deploy the latest version of Guix.\n")) (cons* (option '(#\C "channels") #t #f (lambda (opt name arg result) (alist-cons 'channel-file arg result))) + (option '(#\q "no-channel-files") #f #f + (lambda (opt name arg result) + (alist-cons 'ignore-channel-files? #t result))) (option '(#\l "list-generations") #f #t (lambda (opt name arg result) (cons `(query list-generations ,arg) @@ -166,7 +172,7 @@ Download and deploy the latest version of Guix.\n")) (alist-delete 'repository-url result)))) (option '("commit") #t #f (lambda (opt name arg result) - (alist-cons 'ref `(commit . ,arg) result))) + (alist-cons 'ref `(tag-or-commit . ,arg) result))) (option '("branch") #t #f (lambda (opt name arg result) (alist-cons 'ref `(branch . ,arg) result))) @@ -735,6 +741,9 @@ transformations specified in OPTS (resulting from '--url', '--commit', or (define file (assoc-ref opts 'channel-file)) + (define ignore-channel-files? + (assoc-ref opts 'ignore-channel-files?)) + (define default-file (string-append (config-directory) "/channels.scm")) @@ -750,9 +759,11 @@ transformations specified in OPTS (resulting from '--url', '--commit', or (define channels (cond (file (load-channels file)) - ((file-exists? default-file) + ((and (not ignore-channel-files?) + (file-exists? default-file)) (load-channels default-file)) - ((file-exists? global-file) + ((and (not ignore-channel-files?) + (file-exists? global-file)) (load-channels global-file)) (else %default-channels))) @@ -774,7 +785,8 @@ Use '~/.config/guix/channels.scm' instead.")) (if (guix-channel? c) (let ((url (or url (channel-url c)))) (match ref - (('commit . commit) + ((or ('commit . commit) + ('tag-or-commit . commit)) (channel (inherit c) (url url) (commit commit) (branch #f))) (('branch . branch) |