summaryrefslogtreecommitdiff
path: root/guix
diff options
context:
space:
mode:
Diffstat (limited to 'guix')
-rw-r--r--guix/build/download.scm13
-rw-r--r--guix/git.scm21
-rw-r--r--guix/lint.scm3
-rw-r--r--guix/scripts/build.scm6
-rw-r--r--guix/scripts/gc.scm2
-rw-r--r--guix/scripts/pack.scm6
-rw-r--r--guix/scripts/publish.scm6
-rw-r--r--guix/scripts/pull.scm6
-rw-r--r--guix/utils.scm7
9 files changed, 41 insertions, 29 deletions
diff --git a/guix/build/download.scm b/guix/build/download.scm
index a7bb3b0d6e..641dacefa1 100644
--- a/guix/build/download.scm
+++ b/guix/build/download.scm
@@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2015 Mark H Weaver <mhw@netris.org>
;;; Copyright © 2017 Tobias Geerinckx-Rice <me@tobias.gr>
;;;
@@ -155,11 +155,11 @@ out if the connection could not be established in less than TIMEOUT seconds."
;; be bound if we need them, because (guix download) adds GnuTLS as an
;; input in that case.
-;; XXX: Use this hack instead of #:autoload to avoid compilation errors.
-;; See <http://bugs.gnu.org/12202>.
-(module-autoload! (current-module)
- '(gnutls)
- '(make-session connection-end/client))
+(define (load-gnutls)
+ ;; XXX: Use this hack instead of #:autoload to avoid compilation errors.
+ ;; See <http://bugs.gnu.org/12202>.
+ (module-use! (current-module) (resolve-interface '(gnutls)))
+ (set! load-gnutls (const #t)))
(define %x509-certificate-directory
;; The directory where X.509 authority PEM certificates are stored.
@@ -245,6 +245,7 @@ host name without trailing dot."
(format (current-error-port)
"gnutls: [~a|~a] ~a" (getpid) level str))
+ (load-gnutls)
(let ((session (make-session connection-end/client))
(ca-certs (%x509-certificate-directory)))
diff --git a/guix/git.scm b/guix/git.scm
index 83af596ef5..15a0a6f9e5 100644
--- a/guix/git.scm
+++ b/guix/git.scm
@@ -1,6 +1,6 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2017 Mathieu Othacehe <m.othacehe@gmail.com>
-;;; Copyright © 2018, 2019 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2018, 2019, 2020 Ludovic Courtès <ludo@gnu.org>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -48,11 +48,6 @@
git-checkout-url
git-checkout-branch))
-;; XXX: Use this hack instead of #:autoload to avoid compilation errors.
-;; See <http://bugs.gnu.org/12202>.
-(module-autoload! (current-module)
- '(git submodule) '(repository-submodules))
-
(define %repository-cache-directory
(make-parameter (string-append (cache-directory #:ensure? #f)
"/checkouts")))
@@ -200,11 +195,23 @@ dynamic extent of EXP."
(call-with-repository directory
(lambda (repository) exp ...)))
+(define (load-git-submodules)
+ "Attempt to load (git submodules), which was missing until Guile-Git 0.2.0.
+Return true on success, false on failure."
+ (match (false-if-exception (resolve-interface '(git submodule)))
+ (#f
+ (set! load-git-submodules (const #f))
+ #f)
+ (iface
+ (module-use! (current-module) iface)
+ (set! load-git-submodules (const #t))
+ #t)))
+
(define* (update-submodules repository
#:key (log-port (current-error-port)))
"Update the submodules of REPOSITORY, a Git repository object."
;; Guile-Git < 0.2.0 did not have (git submodule).
- (if (false-if-exception (resolve-interface '(git submodule)))
+ (if (load-git-submodules)
(for-each (lambda (name)
(let ((submodule (submodule-lookup repository name)))
(format log-port (G_ "updating submodule '~a'...~%")
diff --git a/guix/lint.scm b/guix/lint.scm
index 41ddff584d..e3544bd963 100644
--- a/guix/lint.scm
+++ b/guix/lint.scm
@@ -45,7 +45,8 @@
#:use-module (guix gnu-maintenance)
#:use-module (guix cve)
#:use-module ((guix swh) #:hide (origin?))
- #:autoload (guix git-download) (git-reference?)
+ #:autoload (guix git-download) (git-reference?
+ git-reference-url git-reference-commit)
#:use-module (ice-9 match)
#:use-module (ice-9 regex)
#:use-module (ice-9 format)
diff --git a/guix/scripts/build.scm b/guix/scripts/build.scm
index a853ac6c7d..1ab3a80e66 100644
--- a/guix/scripts/build.scm
+++ b/guix/scripts/build.scm
@@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2013 Mark H Weaver <mhw@netris.org>
;;;
;;; This file is part of GNU Guix.
@@ -45,8 +45,8 @@
#:use-module (srfi srfi-37)
#:autoload (gnu packages) (specification->package %package-module-path)
#:autoload (guix download) (download-to-store)
- #:autoload (guix git-download) (git-reference?)
- #:autoload (guix git) (git-checkout?)
+ #:autoload (guix git-download) (git-reference? git-reference-url)
+ #:autoload (guix git) (git-checkout? git-checkout-url)
#:use-module ((guix status) #:select (with-status-verbosity))
#:use-module ((guix progress) #:select (current-terminal-columns))
#:use-module ((guix build syscalls) #:select (terminal-columns))
diff --git a/guix/scripts/gc.scm b/guix/scripts/gc.scm
index 3f20a2e192..31a05075b5 100644
--- a/guix/scripts/gc.scm
+++ b/guix/scripts/gc.scm
@@ -22,7 +22,7 @@
#:use-module (guix store)
#:use-module (guix store roots)
#:autoload (guix build syscalls) (free-disk-space)
- #:autoload (guix profiles) (generation-profile)
+ #:autoload (guix profiles) (generation-profile profile-generations)
#:autoload (guix scripts package) (delete-generations)
#:use-module (ice-9 match)
#:use-module (ice-9 regex)
diff --git a/guix/scripts/pack.scm b/guix/scripts/pack.scm
index b84e37cbf2..c8d8546e29 100644
--- a/guix/scripts/pack.scm
+++ b/guix/scripts/pack.scm
@@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2015, 2017, 2018, 2019 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2015, 2017, 2018, 2019, 2020 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2017, 2018 Ricardo Wurmus <rekado@elephly.net>
;;; Copyright © 2018 Konrad Hinsen <konrad.hinsen@fastmail.net>
;;; Copyright © 2018 Chris Marusich <cmmarusich@gmail.com>
@@ -29,7 +29,9 @@
#:use-module ((guix status) #:select (with-status-verbosity))
#:use-module ((guix self) #:select (make-config.scm))
#:use-module (guix grafts)
- #:autoload (guix inferior) (inferior-package?)
+ #:autoload (guix inferior) (inferior-package?
+ inferior-package-name
+ inferior-package-version)
#:use-module (guix monads)
#:use-module (guix modules)
#:use-module (guix packages)
diff --git a/guix/scripts/publish.scm b/guix/scripts/publish.scm
index 8fb67f9268..71a349d2fe 100644
--- a/guix/scripts/publish.scm
+++ b/guix/scripts/publish.scm
@@ -1,6 +1,6 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2015 David Thompson <davet@gnu.org>
-;;; Copyright © 2015, 2016, 2017, 2018, 2019 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2015, 2016, 2017, 2018, 2019, 2020 Ludovic Courtès <ludo@gnu.org>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -51,7 +51,9 @@
#:use-module (guix store)
#:use-module ((guix serialization) #:select (write-file))
#:use-module (guix zlib)
- #:autoload (guix lzlib) (lzlib-available?)
+ #:autoload (guix lzlib) (lzlib-available?
+ call-with-lzip-output-port
+ make-lzip-output-port)
#:use-module (guix cache)
#:use-module (guix ui)
#:use-module (guix scripts)
diff --git a/guix/scripts/pull.scm b/guix/scripts/pull.scm
index 04cc51829d..cb1be989e1 100644
--- a/guix/scripts/pull.scm
+++ b/guix/scripts/pull.scm
@@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2013, 2014, 2015, 2017, 2018, 2019 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2013, 2014, 2015, 2017, 2018, 2019, 2020 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2017 Marius Bakke <mbakke@fastmail.com>
;;;
;;; This file is part of GNU Guix.
@@ -33,7 +33,9 @@
#:use-module (guix memoization)
#:use-module (guix monads)
#:use-module (guix channels)
- #:autoload (guix inferior) (open-inferior)
+ #:autoload (guix inferior) (open-inferior
+ inferior-available-packages
+ close-inferior)
#:use-module (guix scripts build)
#:autoload (guix build utils) (which)
#:use-module ((guix build syscalls)
diff --git a/guix/utils.scm b/guix/utils.scm
index 728039fbf0..3e8e59b8dc 100644
--- a/guix/utils.scm
+++ b/guix/utils.scm
@@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2013, 2014, 2015 Mark H Weaver <mhw@netris.org>
;;; Copyright © 2014 Eric Bavier <bavier@member.fsf.org>
;;; Copyright © 2014 Ian Denhardt <ian@zenhack.net>
@@ -31,16 +31,13 @@
#:use-module (srfi srfi-26)
#:use-module (srfi srfi-35)
#:use-module (srfi srfi-39)
- #:use-module (ice-9 binary-ports)
#:use-module (ice-9 ftw)
- #:autoload (rnrs io ports) (make-custom-binary-input-port)
+ #:use-module (rnrs io ports) ;need 'port-position' etc.
#:use-module ((rnrs bytevectors) #:select (bytevector-u8-set!))
#:use-module (guix memoization)
#:use-module ((guix build utils) #:select (dump-port mkdir-p delete-file-recursively))
#:use-module ((guix build syscalls) #:select (mkdtemp! fdatasync))
#:use-module (ice-9 format)
- #:autoload (ice-9 popen) (open-pipe*)
- #:autoload (ice-9 rdelim) (read-line)
#:use-module (ice-9 regex)
#:use-module (ice-9 match)
#:use-module (ice-9 format)