[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#25772: [PATCH] guix package: Remove trailing slash from profile path
From: |
Alex Kost |
Subject: |
bug#25772: [PATCH] guix package: Remove trailing slash from profile path. |
Date: |
Sun, 19 Feb 2017 14:53:10 +0300 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux) |
Ricardo Wurmus (2017-02-17 23:38 +0100) wrote:
[...]
>> (let* ((profiles (match (filter-map (match-lambda
>> - (('profile . p) p)
>> - (_ #f))
>> + (('profile . p)
>> + (readlink (string-trim-right p
>> #\/)))
>> + (_ #f))
>> opts)
>> (() (list %current-profile))
>> (lst lst)))
>
> I don’t know if this is the right place for this change or if this
> should be further upstream.
I think it is not the right place: you modify only 'process-query'
procedure, but there is also 'process-actions', so the following command
will still fail:
guix package -p /tmp/test-profile/ -i hello
while the following succeeds:
guix package -p /tmp/test-profile -i hello
So I would rather modify 'canonicalize-profile' procedure in that
module. I think it will be a general solution for --profile option.
--
Alex