guix download fails if filename contains "@"

DoneSubmitted by Hartmut Goebel.
Details
2 participants
  • Hartmut Goebel
  • Ludovic Courtès
Owner
unassigned
Severity
normal
H
H
Hartmut Goebel wrote on 19 Mar 2017 19:06
(address . bug-guix@gnu.org)
4e979de0-b9d9-d489-792c-4a63c91aaba1@crazy-compilers.com
guix download fails if filename contains "@":invalid character `@' in name

$ guix downloadmirror://kde/stable/applications/16.12.3/src/kde-l10n/kde-l10n-ca@valencia-16.12.3.tar.xz[...]Starting download of /tmp/guix-file.oVF3qZFromhttp://mirror.karneval.cz/pub/kde/stable/applications/16.12.3/src/kde-l10n/kde-l10n-ca@valencia-16.12.3.tar.xz... ...cia-16.12.3.tar.xz 2.0MiB 1.4MiB/s 00:01[####################] 100.0%guix download: error: build failed: invalid character `@' in name`kde-l10n-ca@valencia-16.12.3.tar.xz'

Guix version:/gnu/store/v83285dvjy923ikq1dddncixb6kfba0k-guix-0.12.0-5.1162/bin/guix
-- RegardsHartmut Goebel
| Hartmut Goebel | h.goebel@crazy-compilers.com || www.crazy-compilers.com | compilers which you thought are impossible |
L
L
Ludovic Courtès wrote on 20 Mar 2017 23:22
(name . Hartmut Goebel)(address . h.goebel@crazy-compilers.com)(address . 26175@debbugs.gnu.org)
87wpbjsi4v.fsf@gnu.org
Hello,
Hartmut Goebel <h.goebel@crazy-compilers.com> skribis:
Toggle quote (14 lines)> guix download fails if filename contains "@":invalid character `@' in name>>> $ guix download> mirror://kde/stable/applications/16.12.3/src/kde-l10n/kde-l10n-ca@valencia-16.12.3.tar.xz> [...]> Starting download of /tmp/guix-file.oVF3qZ> From> http://mirror.karneval.cz/pub/kde/stable/applications/16.12.3/src/kde-l10n/kde-l10n-ca@valencia-16.12.3.tar.xz...> ...cia-16.12.3.tar.xz 2.0MiB 1.4MiB/s 00:01> [####################] 100.0%> guix download: error: build failed: invalid character `@' in name> `kde-l10n-ca@valencia-16.12.3.tar.xz'
To address this we’d need an extra command-line option in ‘guixdownload’ to specify the name to use in the store (similar to the‘file-name’ field in <origin>.)
So one would type:
guix download --name=foo.tar.xz mirror://…/kde-l10n-ca@valencia-16.12.3.tar.xz
In the meantime, you can work around it by doing something like:
guix download -o foo.tar.xz mirror://…/kde-l10n-ca@valencia-16.12.3.tar.xz guix hash foo.tar.xz
Thanks,Ludo’.
H
H
Hartmut Goebel wrote on 20 Mar 2017 23:30
(name . Ludovic Courtès)(address . ludo@gnu.org)(address . 26175@debbugs.gnu.org)
a4107fcf-e366-32a3-c907-03263e3acd23@crazy-compilers.com
Am 20.03.2017 um 23:22 schrieb Ludovic Courtès:
Toggle quote (8 lines)> To address this we’d need an extra command-line option in ‘guix> download’ to specify the name to use in the store (similar to the> ‘file-name’ field in <origin>.)>> So one would type:>> guix download --name=foo.tar.xz mirror://…/kde-l10n-ca@valencia-16.12.3.tar.xz
IMHO this i not a good solution, since it puts the burden of handling anon-obvious restriction to the user. This makes things complicated andless-skilled discourages people. "guix download" should implement someescape automatic mechanisms.
-- RegardsHartmut Goebel
| Hartmut Goebel | h.goebel@crazy-compilers.com || www.crazy-compilers.com | compilers which you thought are impossible |
L
L
Ludovic Courtès wrote on 21 Mar 2017 09:57
(name . Hartmut Goebel)(address . h.goebel@crazy-compilers.com)(address . 26175@debbugs.gnu.org)
87a88fvwgq.fsf@gnu.org
Hartmut Goebel <h.goebel@crazy-compilers.com> skribis:
Toggle quote (14 lines)> Am 20.03.2017 um 23:22 schrieb Ludovic Courtès:>> To address this we’d need an extra command-line option in ‘guix>> download’ to specify the name to use in the store (similar to the>> ‘file-name’ field in <origin>.)>>>> So one would type:>>>> guix download --name=foo.tar.xz mirror://…/kde-l10n-ca@valencia-16.12.3.tar.xz>> IMHO this i not a good solution, since it puts the burden of handling a> non-obvious restriction to the user. This makes things complicated and> less-skilled discourages people. "guix download" should implement some> escape automatic mechanisms.
Oh right, that’s another possibility, and I agree it’d be better.
Ludo’.
H
H
Hartmut Goebel wrote on 3 Sep 2019 16:39
Re: [bug#36976] [PATCH 1/1] download: Map file-name characters not allowed in store.
(name . Ludovic Courtès)(address . ludo@gnu.org)(address . 26175@debbugs.gnu.org)
af79fc5d-d162-02bd-1d5f-165dec4cc879@crazy-compilers.com
Hi Ludo,
while http://issues.guix.gnu.org/issue/36976is going to solve the issuefor "guix download", I found that there are other cases where invalidcharacters in store names appear. Thus we need a more elaborate solution- or several solutions.
Any suggestions which cases to check and how to fix them?

E.g. "@" and "%" are not allowed in package source base names: Whenbuilding the package below, which used the "offending URL, yields an error:
guix build: error: invalid character `@' in name`kde-l10n-ca@valencia-14.11.80.tar.xz.drv'
Same when trying to work around this be using "…%40…".
(use-modules (guix packages) (guix download) (guix build-system gnu))
(package  (name "kde-l10n-ca-valencia")  (version "14.11.80")  (source   (origin     (method url-fetch)     (uri (string-append "mirror://kde//Attic/applications/"                         version "/src/kde-l10n/"                         "kde-l10n-ca@valencia-" version ".tar.xz"))     (sha256 (base32"1mqadassxcm0m9r1l02m5vr4bbandn48xz8gifvxmb4wiz8i8d0w"))))  (build-system gnu-build-system)  (synopsis "") (description "") (license "") (home-page ""))
-- RegardsHartmut Goebel
| Hartmut Goebel | h.goebel@crazy-compilers.com || www.crazy-compilers.com | compilers which you thought are impossible |
L
L
Ludovic Courtès wrote on 4 Sep 2019 12:32
(name . Hartmut Goebel)(address . h.goebel@crazy-compilers.com)(address . 26175@debbugs.gnu.org)
87v9u873na.fsf@gnu.org
Hi, Hartmut Goebel <h.goebel@crazy-compilers.com> skribis:
Toggle quote (5 lines)>    (origin >      (method url-fetch) >      (uri (string-append "mirror://kde//Attic/applications/" >                          version "/src/kde-l10n/" >                          "kde-l10n-ca@valencia-" version ".tar.xz"))
In this case just add a ‘file-name’ field. I think that’s a reasonable expectation. Thanks, Ludo’.
H
H
Hartmut Goebel wrote on 8 Sep 2019 20:50
(name . Ludovic Courtès)(address . ludo@gnu.org)(address . 26175@debbugs.gnu.org)
d389e39b-1482-c9a7-3034-661b59cbb9b1@crazy-compilers.com
Am 04.09.19 um 12:32 schrieb Ludovic Courtès:
Toggle quote (15 lines)> Hi,>> Hartmut Goebel <h.goebel@crazy-compilers.com> skribis:>>>    (origin>>      (method url-fetch)>>      (uri (string-append "mirror://kde//Attic/applications/">>                          version "/src/kde-l10n/">>                          "kde-l10n-ca@valencia-" version ".tar.xz"))> In this case just add a ‘file-name’ field. I think that’s a reasonable> expectation.>> Thanks,> Ludo’.
Agreed. WDYT about adding this as a hint when the error shows up?
How can I catch the "error: invalid character `@' in name" in guix build?
-- RegardsHartmut Goebel
| Hartmut Goebel | h.goebel@crazy-compilers.com || www.crazy-compilers.com | compilers which you thought are impossible |
L
L
Ludovic Courtès wrote on 8 Sep 2019 22:07
(name . Hartmut Goebel)(address . h.goebel@crazy-compilers.com)(address . 26175@debbugs.gnu.org)
87h85m4knl.fsf@gnu.org
Hartmut Goebel <h.goebel@crazy-compilers.com> skribis:
Toggle quote (20 lines)> Am 04.09.19 um 12:32 schrieb Ludovic Courtès:>> Hi,>>>> Hartmut Goebel <h.goebel@crazy-compilers.com> skribis:>>>>>    (origin>>>      (method url-fetch)>>>      (uri (string-append "mirror://kde//Attic/applications/">>>                          version "/src/kde-l10n/">>>                          "kde-l10n-ca@valencia-" version ".tar.xz"))>> In this case just add a ‘file-name’ field. I think that’s a reasonable>> expectation.>>>> Thanks,>> Ludo’.>> Agreed. WDYT about adding this as a hint when the error shows up?>> How can I catch the "error: invalid character `@' in name" in guix build?
Unfortunately it cannot really be caught. I mean, you could catch‘&store-protocol-error’ error conditions, but then the error message isjust a string, there’s no error code you can compare against.
Ludo’.
H
H
Hartmut Goebel wrote on 26 Sep 2019 17:53
(address . 26175-close@debbugs.gnu.org)
cd9d69a0-5dea-9be6-2780-72c5a7543a66@crazy-compilers.com
Done, see dec845606d2d184da31065fa26cd951b84b3ce2d andhttp://issues.guix.gnu.org/issue/36976#5
-- RegardsHartmut Goebel
| Hartmut Goebel | h.goebel@crazy-compilers.com || www.crazy-compilers.com | compilers which you thought are impossible |
?
Your comment

This issue is archived.

To comment on this conversation send email to 26175@debbugs.gnu.org