mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-12-24 21:38:07 -05:00
profiles: Move 'manifest-entry-dependencies' user after definition.
Reported by Efraim Flashner. * guix/profiles.scm (manifest-transitive-entries): Move after <manifest-entry> definition.
This commit is contained in:
parent
1804d21017
commit
2e2b5ad7bb
1 changed files with 17 additions and 17 deletions
|
@ -159,23 +159,6 @@ (define-record-type <manifest>
|
|||
;; Convenient alias, to avoid name clashes.
|
||||
(define make-manifest manifest)
|
||||
|
||||
(define (manifest-transitive-entries manifest)
|
||||
"Return the entries of MANIFEST along with their propagated inputs,
|
||||
recursively."
|
||||
(let loop ((entries (manifest-entries manifest))
|
||||
(result '())
|
||||
(visited (set))) ;compare with 'equal?'
|
||||
(match entries
|
||||
(()
|
||||
(reverse result))
|
||||
((head . tail)
|
||||
(if (set-contains? visited head)
|
||||
(loop tail result visited)
|
||||
(loop (append (manifest-entry-dependencies head)
|
||||
tail)
|
||||
(cons head result)
|
||||
(set-insert head visited)))))))
|
||||
|
||||
(define-record-type* <manifest-entry> manifest-entry
|
||||
make-manifest-entry
|
||||
manifest-entry?
|
||||
|
@ -200,6 +183,23 @@ (define-record-type* <manifest-pattern> manifest-pattern
|
|||
(output manifest-pattern-output ; string | #f
|
||||
(default "out")))
|
||||
|
||||
(define (manifest-transitive-entries manifest)
|
||||
"Return the entries of MANIFEST along with their propagated inputs,
|
||||
recursively."
|
||||
(let loop ((entries (manifest-entries manifest))
|
||||
(result '())
|
||||
(visited (set))) ;compare with 'equal?'
|
||||
(match entries
|
||||
(()
|
||||
(reverse result))
|
||||
((head . tail)
|
||||
(if (set-contains? visited head)
|
||||
(loop tail result visited)
|
||||
(loop (append (manifest-entry-dependencies head)
|
||||
tail)
|
||||
(cons head result)
|
||||
(set-insert head visited)))))))
|
||||
|
||||
(define (profile-manifest profile)
|
||||
"Return the PROFILE's manifest."
|
||||
(let ((file (string-append profile "/manifest")))
|
||||
|
|
Loading…
Reference in a new issue