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

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

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    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

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

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

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment