Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 16617289 authored by Abhishek Pandit-Subedi's avatar Abhishek Pandit-Subedi
Browse files

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
parent ada46638
Loading
Loading
Loading
Loading
+10 −4
Original line number Original line Diff line number Diff line
@@ -537,8 +537,14 @@ class HostBuild():
        shutil.rmtree(self.output_dir)
        shutil.rmtree(self.output_dir)


        # Remove Cargo.lock that may have become generated
        # Remove Cargo.lock that may have become generated
        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:
            try:
            os.remove(os.path.join(self.platform_dir, 'bt', 'Cargo.lock'))
                os.remove(lock_file)
                print('Removed {}'.format(lock_file))
            except FileNotFoundError:
            except FileNotFoundError:
                pass
                pass