From: Xinglu Chen <public@yoctocell.xyz>
To: 52731@debbugs.gnu.org
Subject: [bug#52731] [PATCH] import: texlive: Check if Subversion is installed.
Date: Wed, 22 Dec 2021 10:01:01 +0100 [thread overview]
Message-ID: <132d0f25d38be2a34abec3c43e4d685cdd0abe65.1640163645.git.public@yoctocell.xyz> (raw)
Exit with a friendlier error message instead of throwing throwing a “failed with
signal 11” error if ‘svn’ isn’t in the user’s PATH.
$ guix import texlive getmap
command "svn" "export" "--non-interactive" "--trust-server-cert" "-r" "59745" "svn://www.tug.org/texlive/tags/texlive-2021.3/Master/texmf-dist/doc/latex/getmap/" "/tmp/guix-directory.YgfGgo/doc/latex/getmap/" failed with signal 11
* doc/guix.texi (Invoking guix import): Mention that Subversion has be
installed.
* guix/import/texlive.scm (tlpdb->package): Check if ‘svn’ is found in PATH,
if not exit with an error message.
---
doc/guix.texi | 4 +++-
guix/import/texlive.scm | 7 +++++++
2 files changed, 10 insertions(+), 1 deletion(-)
diff --git a/doc/guix.texi b/doc/guix.texi
index 333cb4117a..1ece51de81 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -12020,7 +12020,9 @@
Information about the package is obtained from the TeX Live package
database, a plain text file that is included in the @code{texlive-bin}
package. The source code is downloaded from possibly multiple locations
-in the SVN repository of the Tex Live project.
+in the SVN repository of the Tex Live project. This means that the
+@code{subversion} package has to be installed in order for the importer
+to work.
The command command below imports metadata for the @code{fontspec}
TeX package:
diff --git a/guix/import/texlive.scm b/guix/import/texlive.scm
index bdef9f58b0..e3b870efa0 100644
--- a/guix/import/texlive.scm
+++ b/guix/import/texlive.scm
@@ -1,6 +1,7 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2017, 2021 Ricardo Wurmus <rekado@elephly.net>
;;; Copyright © 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
+;;; Copyright © 2021 Xinglu Chen <public@yoctocell.xyz>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -37,6 +38,8 @@ (define-module (guix import texlive)
#:use-module (guix utils)
#:use-module (guix upstream)
#:use-module (guix packages)
+ #:use-module (guix diagnostics)
+ #:use-module (guix i18n)
#:use-module (guix build-system texlive)
#:export (texlive->guix-package
texlive-recursive-import))
@@ -204,6 +207,10 @@ (define (files->directories files)
equal?)))
(define (tlpdb->package name package-database)
+ ;; Check if 'svn' is available.
+ (unless (search-path (string-split (getenv "PATH") #\:) "svn")
+ (leave (G_ "the 'svn' program has to be in your PATH~%")))
+
(and-let* ((data (assoc-ref package-database name))
(dirs (files->directories
(map (lambda (dir)
base-commit: 87e5502d406bfb44b61f7577b241602e02a3498e
--
2.33.1
next reply other threads:[~2021-12-22 9:02 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-22 9:01 Xinglu Chen [this message]
2021-12-22 11:50 ` [bug#52731] [PATCH] import: texlive: Check if Subversion is installed Liliana Marie Prikler
2021-12-22 13:42 ` Xinglu Chen
2021-12-22 14:23 ` zimoun
2021-12-22 15:21 ` Xinglu Chen
2022-11-17 13:10 ` [bug#52731] (no subject) yarl baudig
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=132d0f25d38be2a34abec3c43e4d685cdd0abe65.1640163645.git.public@yoctocell.xyz \
--to=public@yoctocell.xyz \
--cc=52731@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).