unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#44344] [PATCH] guix: describe: Improve package provenance tracking.
@ 2020-10-31 14:40 Julien Lepiller
  2020-10-31 17:30 ` Ludovic Courtès
  0 siblings, 1 reply; 7+ messages in thread
From: Julien Lepiller @ 2020-10-31 14:40 UTC (permalink / raw)
  To: 44344

%load-path lists ~/.config/guix/current before individual channels.  We
use canonicalize-path to get the store path for channel packages.

* guix/describe.scm (package-provenance): Use canonicalize-path.
---
 guix/describe.scm | 28 ++++++++++++++--------------
 1 file changed, 14 insertions(+), 14 deletions(-)

diff --git a/guix/describe.scm b/guix/describe.scm
index 05bf99eb58..fe5921a3b3 100644
--- a/guix/describe.scm
+++ b/guix/describe.scm
@@ -132,25 +132,25 @@ property of manifest entries, or #f if it could not be determined."
     (file
      (let ((file (if (string-prefix? "/" file)
                      file
-                     (search-path %load-path file))))
+                     (canonicalize-path (search-path %load-path file)))))
        (and file
             (string-prefix? (%store-prefix) file)
 
             ;; Always store information about the 'guix' channel and
             ;; optionally about the specific channel FILE comes from.
-            (or (let ((main  (and=> (find (lambda (entry)
-                                            (string=? "guix"
-                                                      (manifest-entry-name entry)))
-                                          (current-profile-entries))
-                                    entry-source))
-                      (extra (any (lambda (entry)
-                                    (let ((item (manifest-entry-item entry)))
-                                      (and (string-prefix? item file)
-                                           (entry-source entry))))
-                                  (current-profile-entries))))
-                  (and main
-                       `(,main
-                         ,@(if extra (list extra) '()))))))))))
+            (let ((main  (and=> (find (lambda (entry)
+                                        (string=? "guix"
+                                                  (manifest-entry-name entry)))
+                                      (current-profile-entries))
+                                entry-source))
+                  (extra (any (lambda (entry)
+                                (let ((item (manifest-entry-item entry)))
+                                  (and (string-prefix? item file)
+                                       (entry-source entry))))
+                              (current-profile-entries))))
+              (and main
+                   `(,main
+                     ,@(if extra (list extra) '())))))))))
 
 (define (manifest-entry-with-provenance entry)
   "Return ENTRY with an additional 'provenance' property if it's not already
-- 
2.28.0





^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2020-11-03 11:26 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-31 14:40 [bug#44344] [PATCH] guix: describe: Improve package provenance tracking Julien Lepiller
2020-10-31 17:30 ` Ludovic Courtès
2020-11-01 13:29   ` Julien Lepiller
2020-11-02 16:15     ` Ludovic Courtès
2020-11-02 16:42       ` Julien Lepiller
2020-11-03  9:17         ` Ludovic Courtès
2020-11-03 11:25           ` bug#44344: " Julien Lepiller

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).