me
/
guix
Archived
1
0
Fork 0

describe: 'current-channel-entries' ignores non-channel profile entries.

Fixes <https://bugs.gnu.org/48778>.

A side effect of c47f3fc135 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.
master
Ludovic Courtès 2021-06-13 12:31:02 +02:00
parent bd02e50a02
commit fb3927486a
No known key found for this signature in database
GPG Key ID: 090B11993D9AEBB5
1 changed files with 5 additions and 1 deletions

View File

@ -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