Uploaded image for project: 'IMPALA'
  1. IMPALA
  2. IMPALA-10044

bin/bootstrap_toolchain.py error handling can delete the toolchain directory

    XMLWordPrintableJSON

Details

    Description

      In bin/bootstrap_toolchain.py's DownloadUnpackTarball download() function, the exception handler code will delete the download directory:

          except:  # noqa
            # Clean up any partially-unpacked result.
            if os.path.isdir(unpack_dir):
              shutil.rmtree(unpack_dir)
            if os.path.isdir(download_dir): # <---- wrong
              shutil.rmtree(download_dir)
            raise
      

      This is incorrect. It should only delete the download directory if the download directory is a temporary directory. Otherwise, it would be deleting the actual toolchain directory (and forcing a redownload of everything).

      Attachments

        Activity

          People

            joemcdonnell Joe McDonnell
            joemcdonnell Joe McDonnell
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: