From b9a95420abdf4ae7fe9a347031278a44ad6a1cce Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Tue, 22 Jun 2021 16:42:06 +0200 Subject: profiles: Build union of inputs in the right order. Fixes . Reported by Mathieu Othacehe and Tobias Geerinckx-Rice . Fixes a regression introduced in 8cef92d0633850d97c1a1d4521812268f56672be, whereby in case of file collisions, the "wrong" one would take precedence. * guix/build/profiles.scm (manifest-sexp->inputs+search-paths): Perform a breadth-first traversal. Reverse INPUTS and SEARCH-PATHS in the base case. * tests/profiles.scm ("profile-derivation, ordering & collisions"): New test. --- guix/build/profiles.scm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'guix') diff --git a/guix/build/profiles.scm b/guix/build/profiles.scm index 9249977bed..f9875ca92e 100644 --- a/guix/build/profiles.scm +++ b/guix/build/profiles.scm @@ -159,15 +159,15 @@ (define (manifest-sexp->inputs+search-paths manifest) (((name version output item ('propagated-inputs deps) ('search-paths paths) _ ...) . rest) - (loop (append deps rest) + (loop (append rest deps) ;breadth-first traversal (cons item inputs) (append paths search-paths))) (() - (values inputs + (values (reverse inputs) (delete-duplicates (cons $PATH (map sexp->search-path-specification - search-paths)))))))))) + (reverse search-paths))))))))))) (define* (build-profile output manifest #:key (extra-inputs '()) (symlink symlink)) -- cgit v1.2.3