aboutsummaryrefslogtreecommitdiff
path: root/guix/scripts/pull.scm
diff options
context:
space:
mode:
Diffstat (limited to 'guix/scripts/pull.scm')
-rw-r--r--guix/scripts/pull.scm20
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)