Fixes <https://bugs.gnu.org/49102>.
Reported by Mathieu Othacehe <othacehe@gnu.org>
and Tobias Geerinckx-Rice <me@tobias.gr>.
Fixes a regression introduced in
8cef92d063, 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.