From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tom Rini Date: Sat, 11 Apr 2020 11:20:59 -0400 Subject: [PATCH v3 07/23] buildman: Be more selective about which directories to remove In-Reply-To: <20200318154302.16389-5-sjg@chromium.org> References: <20200318154302.16389-1-sjg@chromium.org> <20200318154302.16389-5-sjg@chromium.org> Message-ID: <20200411152059.GH8031@bill-the-cat> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Wed, Mar 18, 2020 at 09:42:45AM -0600, Simon Glass wrote: > 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: Simon Glass > > [1] 409fc029c40 tools: buildman: Don't use the working dir as build dir Applied to u-boot/master, thanks! -- Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 659 bytes Desc: not available URL: