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.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 45953 in the body.
You can then email your comments to 45953 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#45953; Package guix-patches. (Mon, 18 Jan 2021 08:55:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to JOULAUD François <Francois.JOULAUD <at> radiofrance.com>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Mon, 18 Jan 2021 08:55:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

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



Reply sent to Ludovic Courtès <ludo <at> gnu.org>:
You have taken responsibility. (Tue, 19 Jan 2021 17:18:01 GMT) Full text and rfc822 format available.

Notification sent to JOULAUD François <Francois.JOULAUD <at> radiofrance.com>:
bug acknowledged by developer. (Tue, 19 Jan 2021 17:18:02 GMT) Full text and rfc822 format available.

Message #10 received at 45953-done <at> debbugs.gnu.org (full text, mbox):

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’.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Wed, 17 Feb 2021 12:24:10 GMT) Full text and rfc822 format available.

This bug report was last modified 3 years and 68 days ago.

Previous Next


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