diff options
author | Ludovic Courtès <ludo@gnu.org> | 2017-07-28 17:38:19 +0200 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2017-08-02 00:04:00 +0200 |
commit | 59a16275189f55ddd692b0ea5b415c706fa1fd69 (patch) | |
tree | a4df38ed0673dc57da7cd168092b2f25feb7492f /build-aux/build-self.scm | |
parent | 7441f1dbd77b09f6170858795bc7deea6280b972 (diff) | |
download | guix-59a16275189f55ddd692b0ea5b415c706fa1fd69.tar.gz |
pull: Fetch source code from Git.
* guix/scripts/pull.scm (%snapshot-url, with-environment-variable) (with-PATH): Remove. (ensure-guile-git!): New procedure. (%repository-url): New variable. (%default-options): Add 'repository-url' and 'ref'. (show-help, %options): Add '--commit' and '--url'. (temporary-directory, first-directory, interned-then-deleted) (unpack): Remove. (build-from-source): Rename 'tarball' to 'source'. Remove call to 'unpack'. (build-and-install): Rename 'tarball' to 'source'. (honor-lets-encrypt-certificates!, report-git-error): New procedures. (with-git-error-handling): New macro. (guix-pull)[fetch-tarball]: Remove. Wrap body in 'with-git-error-handling'. Rewrite to use 'latest-repository-commit'. * build-aux/build-self.scm (build): Print an error message and exit when GUILE-GIT is #f. * doc/guix.texi (Invoking guix pull): Mention Git. Document '--commit' and '--branch'.
Diffstat (limited to 'build-aux/build-self.scm')
-rw-r--r-- | build-aux/build-self.scm | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/build-aux/build-self.scm b/build-aux/build-self.scm index 8fb9af23ca..4933e02712 100644 --- a/build-aux/build-self.scm +++ b/build-aux/build-self.scm @@ -224,6 +224,23 @@ files." (current-error-port) (%make-void-port "w"))))) + (unless guile-git + ;; XXX: Guix before February 2017 lacks a 'guile-git' package altogether. + ;; If we try to upgrade anyway, the logic in (guix scripts pull) will not + ;; build (guix git), which will leave us with an unusable 'guix pull'. To + ;; avoid that, fail early. + (format (current-error-port) + "\ +Your installation is too old and lacks a '~a' package. +Please upgrade to an intermediate version first, for instance with: + + guix pull --url=https://git.savannah.gnu.org/cgit/guix.git/snapshot/v0.13.0.tar.gz +\n" + (match (effective-version) + ("2.0" "guile2.0-git") + (_ "guile-git"))) + (exit 1)) + (mlet %store-monad ((guile (guile-for-build))) (gexp->derivation "guix-latest" builder #:modules '((guix build pull) |