build: don't rely on the order of dependencies

It is impossible to sanely keep things tracked like that. All common
algorithms work on unordered graphs, and now we match that as well.
This commit is contained in:
Ciro Santilli 六四事件 法轮功
2019-01-22 00:00:00 +00:00
parent 4db08517dc
commit d41f7d9d23
3 changed files with 118 additions and 90 deletions

View File

@@ -261,7 +261,10 @@ class ShellHelpers:
def rmrf(self, path):
self.print_cmd(['rm', '-r', '-f', path, LF])
if not self.dry_run and os.path.exists(path):
shutil.rmtree(path)
if os.path.isdir(path):
shutil.rmtree(path)
else:
os.unlink(path)
def write_configs(self, config_path, configs, config_fragments=None):
'''