GNU bug report logs - #45953
[PATCH] environment: fix --root option with relative path

Previous Next

Package: guix-patches;

Reported by: JOULAUD François <Francois.JOULAUD <at> radiofrance.com>

Date: Mon, 18 Jan 2021 08:55:01 UTC

Severity: normal

Tags: patch

Done: Ludovic Courtès <ludo <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Ludovic Courtès <ludo <at> gnu.org>
Cc: tracker <at> debbugs.gnu.org
Subject: bug#45953: closed ([PATCH] environment: fix --root option with
 relative path)
Date: Tue, 19 Jan 2021 17:18:01 +0000
[Message part 1 (text/plain, inline)]
Your message dated Tue, 19 Jan 2021 18:16:53 +0100
with message-id <87mtx4hmnu.fsf <at> gnu.org>
and subject line Re: bug#45953: [PATCH] environment: fix --root option with relative path
has caused the debbugs.gnu.org bug report #45953,
regarding [PATCH] environment: fix --root option with relative path
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)


-- 
45953: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=45953
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: JOULAUD François <Francois.JOULAUD <at> radiofrance.com>
To: "guix-patches <at> gnu.org" <guix-patches <at> gnu.org>
Subject: [PATCH] environment: fix --root option with relative path
Date: Mon, 18 Jan 2021 08:26:02 +0000
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 <francois.joulaud <at> radiofrance.com>
---
 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

[Message part 3 (message/rfc822, inline)]
From: Ludovic Courtès <ludo <at> gnu.org>
To: JOULAUD François <Francois.JOULAUD <at> radiofrance.com>
Cc: 45953-done <at> debbugs.gnu.org
Subject: Re: bug#45953: [PATCH] environment: fix --root option with relative
 path
Date: Tue, 19 Jan 2021 18:16:53 +0100
Hi,

JOULAUD François <Francois.JOULAUD <at> radiofrance.com> 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’.


This bug report was last modified 4 years and 174 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.