all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Ricardo Wurmus <rekado@elephly.net>
To: "Ludovic Courtès" <ludo@gnu.org>
Cc: 28303@debbugs.gnu.org
Subject: bug#28303: “guix import texlive keyval” fails
Date: Mon, 09 Oct 2017 23:12:14 +0200	[thread overview]
Message-ID: <87mv50m3f5.fsf@elephly.net> (raw)
In-Reply-To: <8760d4vyh0.fsf@gnu.org>


Hi Ludo,

> --8<---------------cut here---------------start------------->8---
> $ guix import texlive keyval
> ni sekvas la redirektigon al 'https://ctan.org/xml/1.2/pkg/keyval'...
> Backtrace:
>            8 (primitive-load "/gnu/store/xjwq4aprrrb43lvsgbydd0m7pxj5758b-guix-0.13.0-5.…")
> In guix/ui.scm:
>   1331:12  7 (run-guix-command _ . _)
> In guix/scripts/import.scm:
>    114:11  6 (guix-import . _)
> In guix/scripts/import/texlive.scm:
>     91:19  5 (guix-import-texlive . _)
> In guix/memoization.scm:
>      56:0  4 (_ #<hash-table 207b420 0/31> ("keyval" "latex") _)
> In unknown file:
>            3 (_ #<procedure 20a2ba0 at guix/memoization.scm:70:17 ()> #<procedure list _> …)
> In guix/import/texlive.scm:
>    157:25  2 (sxml->package (*TOP* (entry (@ (id "keyval")) (name "keyval") (# "…") …)) _)
> In guix/serialization.scm:
>    270:25  1 (write-file #f #<output: string 24c5310> #:select? _)
> In unknown file:
>            0 (lstat #f)
>
> ERROR: In procedure lstat:
> ERROR: Wrong type (expecting string): #f
> $ guix import texlive latex-graphics
> ni sekvas la redirektigon al 'https://ctan.org/xml/1.2/pkg/latex-graphics'...
> Backtrace:
>            8 (primitive-load "/gnu/store/xjwq4aprrrb43lvsgbydd0m7pxj5758b-guix-0.13.0-5.…")
> In guix/ui.scm:
>   1331:12  7 (run-guix-command _ . _)
> In guix/scripts/import.scm:
>    114:11  6 (guix-import . _)
> In guix/scripts/import/texlive.scm:
>     91:19  5 (guix-import-texlive . _)
> In guix/memoization.scm:
>      56:0  4 (_ #<hash-table 10366c0 0/31> ("latex-graphics" "latex") _)
> In unknown file:
>            3 (_ #<procedure 105e980 at guix/memoization.scm:70:17 ()> #<procedure list _> …)
> In guix/import/texlive.scm:
>    157:25  2 (sxml->package (*TOP* (entry (@ (id "latex-graphics")) (name "latex…") …)) _)
> In guix/serialization.scm:
>    270:25  1 (write-file #f #<output: string 1464310> #:select? _)
> In unknown file:
>            0 (lstat #f)
>
> ERROR: In procedure lstat:
> ERROR: Wrong type (expecting string): #f
> --8<---------------cut here---------------end--------------->8---

In the case of “keyval” I don’t know exactly what is wrong, but in
general it looks like the importer doesn’t use subversion from the store
but expects it to be available in the environment.

If you don’t have subversion in the environment this will fail:

--8<---------------cut here---------------start------------->8---
guix import texlive multirow
following redirection to `https://ctan.org/xml/1.2/pkg/multirow'...
Backtrace:
          17 (primitive-load "/gnu/store/zh0lb2g15hirq7zw2477w7s5ww7dxkv0-guix-0.13.0-6.a9468b4/bin/.guix-real")
In guix/ui.scm:
  1375:12 16 (run-guix-command _ . _)
In guix/scripts/import.scm:
   114:11 15 (guix-import . _)
In guix/scripts/import/texlive.scm:
    91:19 14 (guix-import-texlive . _)
In guix/memoization.scm:
     56:0 13 (_ #<hash-table 2dcdbe0 0/31> ("multirow" "latex") _)
In unknown file:
          12 (_ #<procedure 2deff80 at guix/memoization.scm:70:17 ()> #<procedure list _> #<undefined>)
In ice-9/boot-9.scm:
    142:2 11 (dynamic-wind #<procedure 2e225a0 at ice-9/boot-9.scm:1057:2 _> #<procedure 2e22580 at ice-9/eval.scm:330:1…> …)
In ice-9/eval.scm:
   174:20 10 (_ #(#(#(#(#(#(#(#(#(#<directory (guix import texlive) 268e280> #<variable 2f4f7a0 …> …)) …) …) …) …) …) …) …))
   177:32  9 (lp (#<procedure 2e38a00 at ice-9/eval.scm:182:7 (env)> #<procedure 2e389e0 at ice-9/eval.scm:282:4 (env)> …))
    159:9  8 (_ #(#(#(#(#(#(#(#(#(#<directory (guix import texlive) 268e280> #<variable 2f4f7a0 …> …)) …) …) …) …) …) …) …))
   174:20  7 (_ #(#(#(#(#(#(#(#(#(#<directory (guix import texlive) 268e280> #<variable 2f4f7a0 …> …)) …) …) …) …) …) …) …))
   177:32  6 (lp (#<procedure 2e42980 at ice-9/eval.scm:182:7 (env)>))
    159:9  5 (_ #(#(#(#(#(#(#(#(#(#<directory (guix import texlive) 268e280> #<variable 2f4f7a0 …> …)) …) …) …) …) …) …) …))
    159:9  4 (_ #(#(#(#(#(#(#(#(#(#<directory (guix import texlive) 268e280> #<variable 2f4f7a0 …> …)) …) …) …) …) …) …) …))
    155:9  3 (_ #(#(#(#(#(#(#(#(#(#<directory (guix import texlive) 268e280> #<variable 2f4f7a0 …> …)) …) …) …) …) …) …) …))
    619:8  2 (_ #(#(#<directory (guix import texlive) 268e280> #f) #<output: string 2dd7380> #<procedure 2e42680 at gui…>))
In guix/serialization.scm:
   270:25  1 (write-file #f #<output: string 2dd7380> #:select? _)
In unknown file:
           0 (lstat #f)

ERROR: In procedure lstat:
ERROR: Wrong type (expecting string): #f
--8<---------------cut here---------------end--------------->8---

But it’s fine when run inside “guix environment --ad-hoc subversion”.

“keyval” is different, though, as it fails no matter if subversion is
available or not.

For packages like that I had a simple workaround to avoid computing the
hash when the SVN download failed:

--8<---------------cut here---------------start------------->8---
diff --git a/guix/import/texlive.scm b/guix/import/texlive.scm
index d4c371436..b554f47d2 100644
--- a/guix/import/texlive.scm
+++ b/guix/import/texlive.scm
@@ -152,11 +152,12 @@ expression describing it."
                    (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)))))))
+                     ,(if checkout (bytevector->nix-base32-string
+                                    (let-values (((port get-hash) (open-sha256-port)))
+                                      (write-file checkout port)
+                                      (force-output port)
+                                      (get-hash)))
+                          "COULD-NOT-DOWNLOAD-SVN-REPO")))))
          (build-system texlive-build-system)
          (arguments ,`(,'quote (#:tex-directory ,(string-join (list component id) "/"))))
          (home-page ,home-page)
--8<---------------cut here---------------end--------------->8---

The real problem here that should be fixed first, however, is that the
subversion package isn’t used automatically.

--
Ricardo

GPG: BCA6 89B6 3655 3801 C3C6  2150 197A 5888 235F ACAC
https://elephly.net

  reply	other threads:[~2017-10-09 21:13 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-31 10:11 bug#28303: “guix import texlive keyval” fails Ludovic Courtès
2017-10-09 21:12 ` Ricardo Wurmus [this message]
2017-10-10  6:51   ` Ludovic Courtès
2021-09-16  6:51     ` zimoun
2021-09-16 10:57       ` Ricardo Wurmus
2021-09-21  6:42         ` zimoun

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87mv50m3f5.fsf@elephly.net \
    --to=rekado@elephly.net \
    --cc=28303@debbugs.gnu.org \
    --cc=ludo@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 external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.