BuildStream misorders elements in subdirectories of symlinks when link_files called in compose elements
Summary
Occasionally in compose
elements BuildStream will miss a subdirectory of a symlink when hardlinking files across. This is related to split rules (I think). This causes the build to fail, as it attempts to link a file into a non-existent directory.
Here is the order which some files are passed to safe_link
from link_files
:
usr/etc # directory
usr/etc/OpenCL # symlink to /usr/lib/GL/OpenCL/
usr/etc/OpenCL/vendors/mesa.icd # file (technically in /usr/lib/GL/OpenCL
...
...
usr/lib/GL/OpenCL
usr/lib/GL/OpenCL/vendors
This seems to be an issue in how sorting the files works.
Steps to reproduce
This behaviour happened in these pipelines in freedesktop-sdk.
Beyond rerunning these pipelines I am unsure on how to reproduce.
Other relevant information
-
BuildStream version affected: /milestone %BuildStream_v1.2
-
Issue on freedesktop-sdk potentially blocked by this: freedesktop-sdk/freedesktop-sdk#333 (closed)
Edited by Tom Coldrick