[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#25772: [PATCH] guix package: Remove trailing slash from profile path
From: |
Ricardo Wurmus |
Subject: |
bug#25772: [PATCH] guix package: Remove trailing slash from profile path. |
Date: |
Fri, 17 Feb 2017 23:38:51 +0100 |
User-agent: |
mu4e 0.9.18; emacs 25.1.1 |
Ricardo Wurmus <address@hidden> writes:
> Fixes: <http://bugs.gnu.org/25762>.
>
> * guix/scripts/package.scm (process-query): Remove trailing slash from profile
> argument and resolve links.
> ---
> guix/scripts/package.scm | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/guix/scripts/package.scm b/guix/scripts/package.scm
> index 9e5b7f3c7..544a1730e 100644
> --- a/guix/scripts/package.scm
> +++ b/guix/scripts/package.scm
> @@ -6,6 +6,7 @@
> ;;; Copyright © 2016 Roel Janssen <address@hidden>
> ;;; Copyright © 2016 Benz Schenk <address@hidden>
> ;;; Copyright © 2016 Chris Marusich <address@hidden>
> +;;; Copyright © 2017 Ricardo Wurmus <address@hidden>
> ;;;
> ;;; This file is part of GNU Guix.
> ;;;
> @@ -663,8 +664,9 @@ doesn't need it."
> "Process any query specified by OPTS. Return #t when a query was actually
> processed, #f otherwise."
> (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.
--
Ricardo
GPG: BCA6 89B6 3655 3801 C3C6 2150 197A 5888 235F ACAC
https://elephly.net