Subject: bug#45953: closed (Re: bug#45953: [PATCH] environment: fix --root option with relative path)

From: [email-masked] (GNU bug Tracking System)
Date: Tue, 19 Jan 2021 17:18:02 +0000

Your bug report

#45953: [PATCH] environment: fix --root option with relative path

which was filed against the guix-patches package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
45953: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=45953
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#45953: [PATCH] environment: fix --root option with relative path
From: Ludovic Courtès <[email-masked]>
To: JOULAUD François <[email-masked]>
Cc: [email-masked]
Date: Tue, 19 Jan 2021 18:16:53 +0100
List-Id: <debbugs-submit.debbugs.gnu.org>

Hi,

JOULAUD François <[email-masked]> skribis:

> The path normalization of `--root` option of `guix environment` was
> buggy as it appended full argument after normalized directory. This
> patch fixes it.
>
> * guix/scripts/environment.scm: fix gc-root path normalization

Good catch!  I added a test, tweaked the commit log, and pushed:

  https://git.savannah.gnu.org/cgit/guix.git/commit/?id=4d79f072cc7b502fc25486d514c9200ba684a596

Thanks,
Ludo’.

Subject: [PATCH] environment: fix --root option with relative path
From: JOULAUD François <[email-masked]>
To: "[email-masked]" <[email-masked]>
Date: Mon, 18 Jan 2021 08:26:02 +0000
List-Id: <debbugs-submit.debbugs.gnu.org>

The path normalization of `--root` option of `guix environment` was
buggy as it appended full argument after normalized directory. This
patch fixes it.

* guix/scripts/environment.scm: fix gc-root path normalization

Signed-off-by: Francois Joulaud <[email-masked]>
---
 guix/scripts/environment.scm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/guix/scripts/environment.scm b/guix/scripts/environment.scm
index fbc202c658..f4d12f89bf 100644
--- a/guix/scripts/environment.scm
+++ b/guix/scripts/environment.scm
@@ -675,7 +675,7 @@ message if any test fails."
   (let* ((root (if (string-prefix? "/" root)
                    root
                    (string-append (canonicalize-path (dirname root))
-                                  "/" root))))
+                                  "/" (basename root)))))
     (catch 'system-error
       (lambda ()
         (symlink target root)
-- 
2.28.0