diff options
author | 2022-09-28 10:11:10 -0700 | |
---|---|---|
committer | 2022-09-28 10:11:10 -0700 | |
commit | 166172894ed0299ddf37ef7f7f040c4bcf02d830 (patch) | |
tree | b20f2ee3dbe36195c9721bce2ca387bb3258b772 /build.py | |
parent | ada466383b00fba581085397b4a1fbe85acb5a24 (diff) |
floss: Delete rootcanal Cargo.lock in build.py
When running ./build.py --target clean, we should also get rid of the
rootcanal build.py so we don't get package conflicts.
Bug: 249187187
Tag: #floss
Test: ./build.py --target clean and full build after.
Change-Id: Ifccc28f38ed0ec8c899dac3430be816b9653bd83
Diffstat (limited to 'build.py')
-rwxr-xr-x | build.py | 14 |
1 files changed, 10 insertions, 4 deletions
@@ -537,10 +537,16 @@ class HostBuild(): shutil.rmtree(self.output_dir) # Remove Cargo.lock that may have become generated - try: - os.remove(os.path.join(self.platform_dir, 'bt', 'Cargo.lock')) - except FileNotFoundError: - pass + cargo_lock_files = [ + os.path.join(self.platform_dir, 'bt', 'Cargo.lock'), + os.path.join(self.platform_dir, 'bt', 'tools', 'rootcanal', 'Cargo.lock'), + ] + for lock_file in cargo_lock_files: + try: + os.remove(lock_file) + print('Removed {}'.format(lock_file)) + except FileNotFoundError: + pass def _target_all(self): """ Build all common targets (skipping doc, test, and clean). |