GNU bug report logs - #45910
[PATCH] ui: Switch precedence for extensions.

Previous Next

Package: guix-patches;

Reported by: zimoun <zimon.toutoune <at> gmail.com>

Date: Sat, 16 Jan 2021 00:58:02 UTC

Severity: normal

Tags: patch

Done: Ricardo Wurmus <rekado <at> elephly.net>

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: Ricardo Wurmus <rekado <at> elephly.net>
Cc: tracker <at> debbugs.gnu.org
Subject: bug#45910: closed ([PATCH] ui: Switch precedence for extensions.)
Date: Thu, 28 Jan 2021 17:54:01 +0000
[Message part 1 (text/plain, inline)]
Your message dated Thu, 28 Jan 2021 18:53:00 +0100
with message-id <87lfcdhrsz.fsf <at> elephly.net>
and subject line Re: [PATCH] ui: Look up extensions before built-in commands.
has caused the debbugs.gnu.org bug report #45910,
regarding [PATCH] ui: Switch precedence for extensions.
to be marked as done.

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


-- 
45910: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=45910
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: zimoun <zimon.toutoune <at> gmail.com>
To: guix-patches <at> gnu.org
Cc: zimoun <zimon.toutoune <at> gmail.com>
Subject: [PATCH] ui: Switch precedence for extensions.
Date: Sat, 16 Jan 2021 01:57:08 +0100
* guix/ui.scm (run-guix-command): Modify order that extensions are allowed to
override default commands.
---
 guix/ui.scm | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/guix/ui.scm b/guix/ui.scm
index bd504c68da..ad78d5cedd 100644
--- a/guix/ui.scm
+++ b/guix/ui.scm
@@ -2126,18 +2126,18 @@ found."
   (define module
     (catch 'misc-error
       (lambda ()
-        (resolve-interface `(guix scripts ,command)))
-      (lambda _
         ;; Check if there is a matching extension.
+        (match (search-path (extension-directories)
+                            (format #f "~a.scm" command))
+          (#f
+           (throw 'misc-error))
+          (file
+           (load file)
+           (resolve-interface `(guix extensions ,command)))))
+      (lambda _
         (catch 'misc-error
           (lambda ()
-            (match (search-path (extension-directories)
-                                (format #f "~a.scm" command))
-              (#f
-               (throw 'misc-error))
-              (file
-                (load file)
-                (resolve-interface `(guix extensions ,command)))))
+            (resolve-interface `(guix scripts ,command)))
           (lambda _
             (format (current-error-port)
                     (G_ "guix: ~a: command not found~%") command)

base-commit: 884f320e7ceb35cb8472510e47fc5f1944675d82
-- 
2.29.2



[Message part 3 (message/rfc822, inline)]
From: Ricardo Wurmus <rekado <at> elephly.net>
To: zimoun <zimon.toutoune <at> gmail.com>
Cc: 45910-done <at> debbugs.gnu.org
Subject: Re: [PATCH] ui: Look up extensions before built-in commands.
Date: Thu, 28 Jan 2021 18:53:00 +0100
Pushed!

-- 
Ricardo


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

Previous Next


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