From debbugs-submit-bounces@debbugs.gnu.org Wed Dec 22 04:01:10 2021 Received: (at submit) by debbugs.gnu.org; 22 Dec 2021 09:01:10 +0000 Received: from localhost ([127.0.0.1]:56766 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mzxUj-0005Aj-Vl for submit@debbugs.gnu.org; Wed, 22 Dec 2021 04:01:10 -0500 Received: from lists.gnu.org ([209.51.188.17]:49670) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mzxUi-0005Ac-U4 for submit@debbugs.gnu.org; Wed, 22 Dec 2021 04:01:09 -0500 Received: from eggs.gnu.org ([209.51.188.92]:38992) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mzxUi-0001Je-9k for guix-patches@gnu.org; Wed, 22 Dec 2021 04:01:08 -0500 Received: from h87-96-130-155.cust.a3fiber.se ([87.96.130.155]:41712 helo=mail.yoctocell.xyz) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mzxUf-0002sz-Iu for guix-patches@gnu.org; Wed, 22 Dec 2021 04:01:07 -0500 From: Xinglu Chen DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yoctocell.xyz; s=mail; t=1640163661; bh=QhAXxenw6O3CIlwMypFivsF3BVeyKV/oJnqhtXUdUW0=; h=From:To:Subject:Date; b=EEm2WDJC+PwPvfIjzuMssGfWVYpgRrkShUzALKn9rtPnNRRvZAHfXvPAkRRt6gsB5 rRbHkPKVCYy1jhutHayVd0jDxTAeRJA9EJxfU4hdbhAIju62oqOHpWESbPDnxqyOay LEB/6HHcsLKlQu/cC1wVudrW9Os147EDPNqrjQIU= To: guix-patches@gnu.org Subject: [PATCH] import: texlive: Check if Subversion is installed. Message-Id: <132d0f25d38be2a34abec3c43e4d685cdd0abe65.1640163645.git.public@yoctocell.xyz> Date: Wed, 22 Dec 2021 10:01:01 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=87.96.130.155; envelope-from=public@yoctocell.xyz; helo=mail.yoctocell.xyz X-Spam_score_int: 18 X-Spam_score: 1.8 X-Spam_bar: + X-Spam_report: (1.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FROM_SUSPICIOUS_NTLD=0.499, FROM_SUSPICIOUS_NTLD_FP=0.397, PDS_OTHER_BAD_TLD=1.999, PDS_RDNS_DYNAMIC_FP=0.01, RDNS_DYNAMIC=0.982, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, TO_NO_BRKTS_DYNIP=0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-Spam-Score: 1.7 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: 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/gu [...] Content analysis details: (1.7 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 2.0 PDS_OTHER_BAD_TLD Untrustworthy TLDs [URI: yoctocell.xyz (xyz)] 1.0 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [209.51.188.17 listed in wl.mailspike.net] -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at https://www.dnswl.org/, medium trust [209.51.188.17 listed in list.dnswl.org] 0.5 FROM_SUSPICIOUS_NTLD_FP From abused NTLD 0.5 FROM_SUSPICIOUS_NTLD From abused NTLD -0.0 RCVD_IN_MSPIKE_WL Mailspike good senders X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.1 (/) Exit with a friendlier error message instead of throwing throwing a =E2=80= =9Cfailed with signal 11=E2=80=9D error if =E2=80=98svn=E2=80=99 isn=E2=80=99t in the user= =E2=80=99s PATH. $ guix import texlive getmap command "svn" "export" "--non-interactive" "--trust-server-cert" "-r" "59= 745" "svn://www.tug.org/texlive/tags/texlive-2021.3/Master/texmf-dist/doc/l= atex/getmap/" "/tmp/guix-directory.YgfGgo/doc/latex/getmap/" failed with si= gnal 11 * doc/guix.texi (Invoking guix import): Mention that Subversion has be installed. * guix/import/texlive.scm (tlpdb->package): Check if =E2=80=98svn=E2=80=99 = 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. =20 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 =C2=A9 2017, 2021 Ricardo Wurmus ;;; Copyright =C2=A9 2021 Maxim Cournoyer +;;; Copyright =C2=A9 2021 Xinglu Chen ;;; ;;; 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?))) =20 (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~%"))) +=20=20 (and-let* ((data (assoc-ref package-database name)) (dirs (files->directories (map (lambda (dir) base-commit: 87e5502d406bfb44b61f7577b241602e02a3498e --=20 2.33.1