From mboxrd@z Thu Jan 1 00:00:00 1970 From: Lothar =?UTF-8?B?V2HDn21hbm4=?= Date: Fri, 14 Jul 2017 08:57:05 +0200 Subject: [U-Boot] [PATCH] tools: buildman: prevent trying to use the working directory as build dorectory In-Reply-To: References: <1499240067-9233-1-git-send-email-LW@KARO-electronics.de> Message-ID: <20170714085705.4160b3ea@karo-electronics.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit To: u-boot@lists.denx.de Hi, On Thu, 13 Jul 2017 13:09:58 -0600 Simon Glass wrote: > On 5 July 2017 at 01:34, Lothar Waßmann wrote: > > When the U-Boot base directory happens to have the same name as the > > branch that buildman is directed to use via the '-b' option and no > > output directory is specified with '-o', buildman happily starts > > removing the whole U-Boot sources eventually only stopped with the > > error message: > > OSError: [Errno 20] Not a directory: '..//boards.cfg > > > > Add a check to the builderthread.Mkdir function to verify that the > > path it tries to create does not match the current working > > directory. > > > > Signed-off-by: Lothar Waßmann > > --- > > tools/buildman/builderthread.py | 4 ++++ > > 1 file changed, 4 insertions(+) > > That's nasty, thanks for the fix. > > But this is being done inside each thread so I'm not sure how this > will be reported, or whether buildman will stop correctly. > > Can the check happen before the build even starts, perhaps? E,g, in builder.py? > I don't have the time to look deeper into this, perhaps someone more involved with the builman scripts can have a look into this. Lothar Waßmann