From 166172894ed0299ddf37ef7f7f040c4bcf02d830 Mon Sep 17 00:00:00 2001 From: Abhishek Pandit-Subedi Date: Wed, 28 Sep 2022 10:11:10 -0700 Subject: 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 --- build.py | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'build.py') 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). -- cgit v1.2.3-59-g8ed1b