summaryrefslogtreecommitdiff
path: root/build.py
diff options
context:
space:
mode:
author Abhishek Pandit-Subedi <abhishekpandit@google.com> 2022-09-28 10:11:10 -0700
committer Abhishek Pandit-Subedi <abhishekpandit@google.com> 2022-09-28 10:11:10 -0700
commit166172894ed0299ddf37ef7f7f040c4bcf02d830 (patch)
treeb20f2ee3dbe36195c9721bce2ca387bb3258b772 /build.py
parentada466383b00fba581085397b4a1fbe85acb5a24 (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-xbuild.py14
1 files changed, 10 insertions, 4 deletions
diff --git a/build.py b/build.py
index 9de30f9523..049189aba4 100755
--- a/build.py
+++ b/build.py
@@ -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).