aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2021-06-13 12:31:02 +0200
committerLudovic Courtès <ludo@gnu.org>2021-06-13 23:57:44 +0200
commitfb3927486ac163d11e3af7ca7c4fffcc4be06809 (patch)
tree1c688e159efa8a10afae7abb0bfc09beae5d46fa
parentbd02e50a02ceed914135dba1e69e4457e489cf86 (diff)
downloadguix-fb3927486ac163d11e3af7ca7c4fffcc4be06809.tar.gz
guix-fb3927486ac163d11e3af7ca7c4fffcc4be06809.zip
describe: 'current-channel-entries' ignores non-channel profile entries.
Fixes <https://bugs.gnu.org/48778>. A side effect of c47f3fc13562d82edfd2d47342574154c452843a is that (@ (guix describe) current-profile) provides the correct answer when the 'guix' package is installed in a profile. Consequently, the 'guix' package installed in /run/current-system/profile (for instance) would end up loading all the .scm files in that directory. * guix/describe.scm (current-channel-entries): Remove ENTRY if it lacks the 'source' property.
-rw-r--r--guix/describe.scm6
1 files changed, 5 insertions, 1 deletions
diff --git a/guix/describe.scm b/guix/describe.scm
index 711b7b4290..65cd79094b 100644
--- a/guix/describe.scm
+++ b/guix/describe.scm
@@ -115,7 +115,11 @@ lives in, or the empty list if this is not applicable."
"Return manifest entries corresponding to extra channels--i.e., not the
'guix' channel."
(remove (lambda (entry)
- (string=? (manifest-entry-name entry) "guix"))
+ (or (string=? (manifest-entry-name entry) "guix")
+
+ ;; If ENTRY lacks the 'source' property, it's not an entry
+ ;; from 'guix pull'. See <https://bugs.gnu.org/48778>.
+ (not (assq 'source (manifest-entry-properties entry)))))
(current-profile-entries))))
(define current-channels