[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#25772] [PATCH] guix package: Remove trailing slash from profile pat
From: |
Alex Kost |
Subject: |
[bug#25772] [PATCH] guix package: Remove trailing slash from profile path. |
Date: |
Fri, 21 Jul 2017 22:51:11 +0300 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) |
Ludovic Courtès (2017-07-20 15:31 +0200) wrote:
> Hello!
>
> Alex Kost <address@hidden> skribis:
[...]
>> So I would rather modify 'canonicalize-profile' procedure in that
>> module. I think it will be a general solution for --profile option.
>
> Indeed. I pushed something along these lines as
> edbe07cd67d6050d94fe8ac1af15ab15e857b61d, and a related fix as
> 561f4e450078a06c707d3dcda2cf0e7d6eb5ebae.
>
> Thanks!
Thank you! BTW regarding "trailing slash" problem, there is a similar
issue in defining patch names ('%patch-path' variable in (gnu packages)
module). I described it here:
https://github.com/alezost/guix.el/issues/4#issuecomment-315888298
And here is a full report. In short, if you use Guix from a git
checkout and use it with a trailing slash, Guix will not find patches!
You can reproduce it like this ("$HOME/devel/guix/" is my guix
checkout):
--8<---------------cut here---------------start------------->8---
$ GUILE_LOAD_PATH="$HOME/devel/guix/"
GUILE_LOAD_COMPILED_PATH="$HOME/devel/guix/" guile
GNU Guile 2.2.2
Copyright (C) 1995-2017 Free Software Foundation, Inc.
Guile comes with ABSOLUTELY NO WARRANTY; for details type `,show w'.
This program is free software, and you are welcome to redistribute it
under certain conditions; type `,show c' for details.
Enter `,help' for help.
scheme@(guile-user)> ,use(gnu packages)
scheme@(guile-user)> (search-patch "acl-hurd-path-max.patch")
ERROR: Throw to key `srfi-34' with args `(#<condition &message [message:
"acl-hurd-path-max.patch: patch not found"] 1a32b40>)'.
Entering a new prompt. Type `,bt' for a backtrace or `,q' to continue.
scheme@(guile-user) [1]>
--8<---------------cut here---------------end--------------->8---
The above works as expected if the guix directory is specified without a
trailing slash.
TBH I think this is a Guile problem: such issues wouldn't appear at all,
if there was a general function to work with file names (analogous to
'expand-file-name' in Emacs, for example). But since we have to use
'string-append' for file names, we have to deal with trailing slashes
all the time.
After writing this, I realized that it should probably have been
reported as a separate bug :-)
--
Alex