Skip to content
Commit 925f6adf authored by Simon Glass's avatar Simon Glass Committed by Tom Rini
Browse files

buildman: Be more selective about which directories to remove



At present buildman removes any directory it doesn't intend to write
output into. This is overly expansive since if the output directory
happens to be somewhere with existing files, they may be removed. Using
an existing directory for buildman is not a good practice, but since the
result might be catastrophic, it is best to guard against it.

A previous commit[1] fixed this by refusing to write to a subdirectory
of the current directory, assumed to have U-Boot source code. But we can
do better by only removing directories that look like the ones buildman
creates.

Update the code to do this and add a test.

Signed-off-by: default avatarSimon Glass <sjg@chromium.org>

[1] 409fc029 tools: buildman: Don't use the working dir as build dir
parent 7beb43c9
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment