Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hash packages without unpacking (Fixes #512 and #544) #557

Merged
merged 3 commits into from
Sep 27, 2017

Commits on Sep 1, 2017

  1. Generating hashes of distributions should not interfere with each other

    Some distributions have incompatible type of files with same name
    on the root directory. For example, matplotlib-2.0.2.tar.gz has a
    directory named "LICENSE" on the root, which may conflict many
    other distributions, causing errors like:
    
      IOError: [Errno 20] Not a directory: u'/tmp/tmpz/LICENSE/LICENSE_STIX'
    
    So we need to isolate unpacking directory of each distributions.
    mete0r committed Sep 1, 2017
    Configuration menu
    Copy the full SHA
    877241d View commit details
    Browse the repository at this point in the history

Commits on Sep 2, 2017

  1. Hash packages without unpacking

    The PyPIRepository._get_file_hash used to call unpack_url, when
    generating the hash.  It only needed the side effect of the downloaded
    package being left in the download directory and the unpacking part was
    actually unnecessary.  Change it to just open the (local or remote)
    package as a file object and hash the contents without unpacking.
    
    This makes it faster and lighter, since unpacking consumes CPU cycles
    and disk space, and more importantly, avoids problems which happen when
    some distribution has a file with the same name as a directory in
    another.  Unpacking both to packages to the same directory will then
    fail.  E.g. matplotlib-2.0.2.tar.gz has a directory named LICENSE, but
    many other packages have a file named LICENSE.
    
    Fixes jazzband#512, jazzband#544
    suutari committed Sep 2, 2017
    Configuration menu
    Copy the full SHA
    627dbaf View commit details
    Browse the repository at this point in the history

Commits on Sep 27, 2017

  1. Configuration menu
    Copy the full SHA
    cc5a82f View commit details
    Browse the repository at this point in the history