locate: Ignore unreadable manifests.
Fixes <https://issues.guix.gnu.org/64187>. * guix/scripts/locate.scm (profiles->manifest-entries): Wrap 'profile-manifest' in 'false-if-exception'. Reported-by: Ricardo Wurmus <rekado@elephly.net>
This commit is contained in:
parent
67e22584fa
commit
e1c2c2f042
@ -418,19 +418,24 @@ for each package to insert."
|
||||
(()
|
||||
entries)
|
||||
((profile . rest)
|
||||
(let* ((manifest (profile-manifest profile))
|
||||
(entries visited
|
||||
(fold2 (lambda (entry lst visited)
|
||||
(let ((item (manifest-entry-item entry)))
|
||||
(if (set-contains? visited item)
|
||||
(values lst visited)
|
||||
(values (cons entry lst)
|
||||
(set-insert item
|
||||
visited)))))
|
||||
entries
|
||||
visited
|
||||
(manifest-transitive-entries manifest))))
|
||||
(loop visited rest entries))))))
|
||||
(match (false-if-exception (profile-manifest profile))
|
||||
(#f
|
||||
;; PROFILE's manifest is unreadable for some reason such as an
|
||||
;; unsupported version.
|
||||
(loop visited rest entries))
|
||||
(manifest
|
||||
(let ((entries visited
|
||||
(fold2 (lambda (entry lst visited)
|
||||
(let ((item (manifest-entry-item entry)))
|
||||
(if (set-contains? visited item)
|
||||
(values lst visited)
|
||||
(values (cons entry lst)
|
||||
(set-insert item
|
||||
visited)))))
|
||||
entries
|
||||
visited
|
||||
(manifest-transitive-entries manifest))))
|
||||
(loop visited rest entries))))))))
|
||||
|
||||
(define (insert-manifest-entry db entry)
|
||||
"Insert a manifest ENTRY into DB."
|
||||
|
Loading…
Reference in New Issue
Block a user