GNU bug report logs - #45656
The TeX Live importer should use the texlive.tlpdb database as its input

Previous Next

Package: guix;

Reported by: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>

Date: Mon, 4 Jan 2021 17:12:01 UTC

Severity: normal

Merged with 49977

Done: Ricardo Wurmus <rekado <at> elephly.net>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 45656 in the body.
You can then email your comments to 45656 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-guix <at> gnu.org:
bug#45656; Package guix. (Mon, 04 Jan 2021 17:12:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Maxim Cournoyer <maxim.cournoyer <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-guix <at> gnu.org. (Mon, 04 Jan 2021 17:12:01 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
To: bug-guix <bug-guix <at> gnu.org>
Subject: The TeX Live importer crashes with Wrong type (expecting string): #f
Date: Mon, 04 Jan 2021 12:11:14 -0500
Hello,

The TeX Live importer doesn't appear to be functional:

$ guix import texlive lh
following redirection to `https://ctan.org/xml/1.2/pkg/lh'...
command "svn" "export" "--non-interactive" "--trust-server-cert" "-r" "51265" "svn://www.tug.org/texlive/tags/texlive-2019.3/Master/texmf-dist/source/latex/lh" "/tmp/guix-directory.vfSCcU/svn" failed with signal 11
Backtrace:
In ice-9/boot-9.scm:
  1736:10 15 (with-exception-handler _ _ #:unwind? _ #:unwind-for-type _)
In unknown file:
          14 (apply-smob/0 #<thunk 7fb1a712a4a0>)
In ice-9/boot-9.scm:
    718:2 13 (call-with-prompt _ _ #<procedure default-prompt-handler (k proc)>)
In ice-9/eval.scm:
    619:8 12 (_ #(#(#<directory (guile-user) 7fb1a6d67f00>)))
In guix/ui.scm:
  2118:12 11 (run-guix-command _ . _)
In guix/scripts/import.scm:
   120:11 10 (guix-import . _)
In guix/scripts/import/texlive.scm:
    91:19  9 (guix-import-texlive . _)
In guix/memoization.scm:
     98:0  8 (mproc "lh" "latex")
In unknown file:
           7 (_ #<procedure 7fb1a4c85a20 at guix/memoization.scm:179:32 ()> #<procedure list _> ("lh" …))
In ice-9/boot-9.scm:
  1736:10  6 (with-exception-handler _ _ #:unwind? _ #:unwind-for-type _)
In guix/store.scm:
   632:37  5 (thunk)
In guix/import/texlive.scm:
   162:25  4 (_ _)
In guix/serialization.scm:
    324:6  3 (dump #f)
   257:34  2 (_ _)
In unknown file:
           1 (lstat #f)
In ice-9/boot-9.scm:
  1669:16  0 (raise-exception _ #:continuable? _)

ice-9/boot-9.scm:1669:16: In procedure raise-exception:
Wrong type (expecting string): #f

The same happens with other packages, such as 'ec'.

Thanks,

Maxim




Information forwarded to bug-guix <at> gnu.org:
bug#45656; Package guix. (Mon, 04 Jan 2021 18:31:02 GMT) Full text and rfc822 format available.

Message #8 received at 45656 <at> debbugs.gnu.org (full text, mbox):

From: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
To: 45656 <at> debbugs.gnu.org
Subject: Re: bug#45656: The TeX Live importer crashes with Wrong type
 (expecting string): #f
Date: Mon, 04 Jan 2021 13:30:05 -0500
Hello,

Maxim Cournoyer <maxim.cournoyer <at> gmail.com> writes:

> Hello,
>
> The TeX Live importer doesn't appear to be functional:
>
> $ guix import texlive lh
> following redirection to `https://ctan.org/xml/1.2/pkg/lh'...
> command "svn" "export" "--non-interactive" "--trust-server-cert" "-r" "51265" "svn://www.tug.org/texlive/tags/texlive-2019.3/Master/texmf-dist/source/latex/lh" "/tmp/guix-directory.vfSCcU/svn" failed with signal 11
> Backtrace:
> In ice-9/boot-9.scm:
>   1736:10 15 (with-exception-handler _ _ #:unwind? _ #:unwind-for-type _)
> In unknown file:
>           14 (apply-smob/0 #<thunk 7fb1a712a4a0>)
> In ice-9/boot-9.scm:
>     718:2 13 (call-with-prompt _ _ #<procedure default-prompt-handler (k proc)>)
> In ice-9/eval.scm:
>     619:8 12 (_ #(#(#<directory (guile-user) 7fb1a6d67f00>)))
> In guix/ui.scm:
>   2118:12 11 (run-guix-command _ . _)
> In guix/scripts/import.scm:
>    120:11 10 (guix-import . _)
> In guix/scripts/import/texlive.scm:
>     91:19  9 (guix-import-texlive . _)
> In guix/memoization.scm:
>      98:0  8 (mproc "lh" "latex")
> In unknown file:
>            7 (_ #<procedure 7fb1a4c85a20 at guix/memoization.scm:179:32 ()> #<procedure list _> ("lh" …))
> In ice-9/boot-9.scm:
>   1736:10  6 (with-exception-handler _ _ #:unwind? _ #:unwind-for-type _)
> In guix/store.scm:
>    632:37  5 (thunk)
> In guix/import/texlive.scm:
>    162:25  4 (_ _)
> In guix/serialization.scm:
>     324:6  3 (dump #f)
>    257:34  2 (_ _)
> In unknown file:
>            1 (lstat #f)
> In ice-9/boot-9.scm:
>   1669:16  0 (raise-exception _ #:continuable? _)
>
> ice-9/boot-9.scm:1669:16: In procedure raise-exception:
> Wrong type (expecting string): #f
>
> The same happens with other packages, such as 'ec'.

The reason appears to be that the svn reference URL is wrong;
unfortunately this information is not present in the SXML metadata
retrieved; it seems the best option when such an URL does not exist
would be to fallback to a SVN multi-fetch (perhaps using the
simple-texlive-package procedure to derive a template) of the components
found in the texlive.tlpdb listing found in the output of our
texlive-bin package.

TODO!

Maxim




Information forwarded to bug-guix <at> gnu.org:
bug#45656; Package guix. (Mon, 04 Jan 2021 18:48:01 GMT) Full text and rfc822 format available.

Message #11 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Ricardo Wurmus <rekado <at> elephly.net>
To: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
Cc: bug-guix <at> gnu.org, 45656 <at> debbugs.gnu.org
Subject: Re: bug#45656: The TeX Live importer crashes with Wrong type
 (expecting string): #f
Date: Mon, 04 Jan 2021 19:47:26 +0100
Hi Maxim,

> The TeX Live importer doesn't appear to be functional:

Yes, sadly, it’s not very useful any more.

The next iteration of the importer should use texlive.tlpdb instead of
CTAN *and* the SVN repository.

-- 
Ricardo




Information forwarded to bug-guix <at> gnu.org:
bug#45656; Package guix. (Mon, 04 Jan 2021 18:48:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-guix <at> gnu.org:
bug#45656; Package guix. (Mon, 04 Jan 2021 19:08:01 GMT) Full text and rfc822 format available.

Message #17 received at 45656 <at> debbugs.gnu.org (full text, mbox):

From: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
To: 45656 <at> debbugs.gnu.org
Cc: rekado <at> elephly.net, Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
Subject: [PATCH] import: texlive: Produce a partial package definition rather
 than crashing.
Date: Mon,  4 Jan 2021 14:06:45 -0500
This is a small improvement awaiting a definitive fix for
<https://issues.guix.gnu.org/45656>.

* guix/import/texlive.scm (sxml->package): Produce a warning when the SVN
checkout failed.  Rather than crashing on the unexpected #f value, return a
partial package definition with the source field set to #f.
---
 guix/import/texlive.scm | 32 ++++++++++++++++++++------------
 1 file changed, 20 insertions(+), 12 deletions(-)

diff --git a/guix/import/texlive.scm b/guix/import/texlive.scm
index a84683ef6f..ba04a74d0f 100644
--- a/guix/import/texlive.scm
+++ b/guix/import/texlive.scm
@@ -1,5 +1,6 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2017 Ricardo Wurmus <rekado <at> elephly.net>
+;;; Copyright © 2020 Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -25,6 +26,8 @@
   #:use-module (srfi srfi-26)
   #:use-module (srfi srfi-34)
   #:use-module (web uri)
+  #:use-module (guix diagnostics)
+  #:use-module (guix i18n)
   #:use-module (guix http-client)
   #:use-module (gcrypt hash)
   #:use-module (guix memoization)
@@ -147,21 +150,26 @@ expression describing it."
                          ((license) (string->license license))
                          ((lst ...) (map string->license lst))))
            (home-page  (string-append "http://www.ctan.org/pkg/" id))
-           (ref        (texlive-ref component id))
-           (checkout   (download-svn-to-store store ref)))
+           (ref        (pk (texlive-ref (pk 'component  component) (pk 'id id))))
+           (checkout   (pk 'download (download-svn-to-store store ref))))
+      (unless checkout
+        (warning (G_ "Could not determine source location.  \
+Please manually specify the source field.~%")))
       `(package
          (name ,(guix-name component id))
          (version ,version)
-         (source (origin
-                   (method svn-fetch)
-                   (uri (texlive-ref ,component ,id))
-                   (sha256
-                    (base32
-                     ,(bytevector->nix-base32-string
-                       (let-values (((port get-hash) (open-sha256-port)))
-                         (write-file checkout port)
-                         (force-output port)
-                         (get-hash)))))))
+         (source ,(if checkout
+                      `(origin
+                         (method svn-fetch)
+                         (uri (texlive-ref ,component ,id))
+                         (sha256
+                          (base32
+                           ,(bytevector->nix-base32-string
+                             (let-values (((port get-hash) (open-sha256-port)))
+                               (write-file checkout port)
+                               (force-output port)
+                               (get-hash))))))
+                      #f))
          (build-system texlive-build-system)
          (arguments ,`(,'quote (#:tex-directory ,(string-join (list component id) "/"))))
          (home-page ,home-page)
-- 
2.29.2





Information forwarded to bug-guix <at> gnu.org:
bug#45656; Package guix. (Mon, 04 Jan 2021 19:14:01 GMT) Full text and rfc822 format available.

Message #20 received at 45656 <at> debbugs.gnu.org (full text, mbox):

From: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
To: 45656 <at> debbugs.gnu.org
Cc: rekado <at> elephly.net, Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
Subject: [PATCH v2] import: texlive: Produce a partial package definition
 rather than crashing.
Date: Mon,  4 Jan 2021 14:13:14 -0500
This is a small improvement awaiting a definitive fix for
<https://issues.guix.gnu.org/45656>.

* guix/import/texlive.scm (sxml->package): Produce a warning when the SVN
checkout failed.  Rather than crashing on the unexpected #f value, return a
partial package definition with the source field set to #f.
---
 guix/import/texlive.scm | 28 ++++++++++++++++++----------
 1 file changed, 18 insertions(+), 10 deletions(-)

diff --git a/guix/import/texlive.scm b/guix/import/texlive.scm
index a84683ef6f..18d8b95ee0 100644
--- a/guix/import/texlive.scm
+++ b/guix/import/texlive.scm
@@ -1,5 +1,6 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2017 Ricardo Wurmus <rekado <at> elephly.net>
+;;; Copyright © 2021 Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -25,6 +26,8 @@
   #:use-module (srfi srfi-26)
   #:use-module (srfi srfi-34)
   #:use-module (web uri)
+  #:use-module (guix diagnostics)
+  #:use-module (guix i18n)
   #:use-module (guix http-client)
   #:use-module (gcrypt hash)
   #:use-module (guix memoization)
@@ -149,19 +152,24 @@ expression describing it."
            (home-page  (string-append "http://www.ctan.org/pkg/" id))
            (ref        (texlive-ref component id))
            (checkout   (download-svn-to-store store ref)))
+      (unless checkout
+        (warning (G_ "Could not determine source location.  \
+Please manually specify the source field.~%")))
       `(package
          (name ,(guix-name component id))
          (version ,version)
-         (source (origin
-                   (method svn-fetch)
-                   (uri (texlive-ref ,component ,id))
-                   (sha256
-                    (base32
-                     ,(bytevector->nix-base32-string
-                       (let-values (((port get-hash) (open-sha256-port)))
-                         (write-file checkout port)
-                         (force-output port)
-                         (get-hash)))))))
+         (source ,(if checkout
+                      `(origin
+                         (method svn-fetch)
+                         (uri (texlive-ref ,component ,id))
+                         (sha256
+                          (base32
+                           ,(bytevector->nix-base32-string
+                             (let-values (((port get-hash) (open-sha256-port)))
+                               (write-file checkout port)
+                               (force-output port)
+                               (get-hash))))))
+                      #f))
          (build-system texlive-build-system)
          (arguments ,`(,'quote (#:tex-directory ,(string-join (list component id) "/"))))
          (home-page ,home-page)
-- 
2.29.2





Changed bug title to 'The TeX Live importer should use the texlive.tlpdb database as its input' from 'The TeX Live importer crashes with Wrong type (expecting string): #f' Request was from Maxim Cournoyer <maxim.cournoyer <at> gmail.com> to control <at> debbugs.gnu.org. (Mon, 11 Jan 2021 13:21:01 GMT) Full text and rfc822 format available.

Merged 45656 49977. Request was from Maxim Cournoyer <maxim.cournoyer <at> gmail.com> to control <at> debbugs.gnu.org. (Thu, 19 Aug 2021 02:54:01 GMT) Full text and rfc822 format available.

Reply sent to Ricardo Wurmus <rekado <at> elephly.net>:
You have taken responsibility. (Sun, 21 Nov 2021 08:16:01 GMT) Full text and rfc822 format available.

Notification sent to Maxim Cournoyer <maxim.cournoyer <at> gmail.com>:
bug acknowledged by developer. (Sun, 21 Nov 2021 08:16:02 GMT) Full text and rfc822 format available.

Message #29 received at 45656-done <at> debbugs.gnu.org (full text, mbox):

From: Ricardo Wurmus <rekado <at> elephly.net>
To: 45656-done <at> debbugs.gnu.org
Subject: The TeX Live importer should use the texlive.tlpdb database as its
 input
Date: Sun, 21 Nov 2021 08:14:06 +0000
We now have a new importer that uses the texlive.tlpdb.  It still 
needs a lot of work, but it should already be more useful than the 
previous importer.
Closing.

-- 
Ricardo




Reply sent to Ricardo Wurmus <rekado <at> elephly.net>:
You have taken responsibility. (Sun, 21 Nov 2021 08:16:02 GMT) Full text and rfc822 format available.

Notification sent to Xinglu Chen <public <at> yoctocell.xyz>:
bug acknowledged by developer. (Sun, 21 Nov 2021 08:16:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sun, 19 Dec 2021 12:24:07 GMT) Full text and rfc822 format available.

This bug report was last modified 2 years and 90 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.