paylogic / pip-accel

pip-accel: Accelerator for pip, the Python package manager
https://pypi.python.org/pypi/pip-accel
MIT License
308 stars 35 forks source link

Usage of corrupted package build #38

Closed serathius closed 9 years ago

serathius commented 9 years ago

During building celery, occurred error:

2014-11-13 11:23:46 ns3314108.ovh.net pip_accel.bdist[12645] INFO Building binary distribution of celery (3.1.16) ..
2014-11-13 11:23:47 ns3314108.ovh.net pip_accel.bdist[12645] INFO Finished building celery (3.1.16) in 1.31 second.
Traceback (most recent call last):
  File "/tmp/test-virtualenv/bin/pip-accel", line 9, in <module>
    load_entry_point('pip-accel==0.14.1', 'console_scripts', 'pip-accel')()
  File "/tmp/test-virtualenv/lib/python3.3/site-packages/pip_accel/__init__.py", line 121, in main
    install_requirements(requirements, cache)
  File "/tmp/test-virtualenv/lib/python3.3/site-packages/pip_accel/__init__.py", line 285, in install_requirements
    install_binary_dist(members, prefix=install_prefix, python=python)
  File "/tmp/test-virtualenv/lib/python3.3/site-packages/pip_accel/bdist.py", line 247, in install_binary_dist
    for member, from_handle in members:
  File "/tmp/test-virtualenv/lib/python3.3/site-packages/pip_accel/bdist.py", line 91, in get_binary_dist
    with open(transformed_file, 'rb') as handle:
FileNotFoundError: [Errno 2] No such file or directory: '/tmp/celery-3.1.16.linux-x86_64.tar'

This error didn't stop pip-accel from using not built version of celery, and caused celery package to missfunction. Only way to fix this for that version of celery is manually deletion of that celery build.

In my opinion manual fixing shouldn't be required for every error that occurs during building packages. Additionally tmp folder doesn't guarantee file persistence event between two shell commands, so opening of temporary files should be better handled.

xolox commented 9 years ago

Hi @serathius and thanks for the feedback!

This error didn't stop pip-accel from using not built version of celery, and caused celery package to missfunction. Only way to fix this for that version of celery is manually deletion of that celery build.

I don't understand this remark. If there is no binary distribution archive to install, how could pip-accel have been under the impression that it was installing something? The output you quoted shows that pip-accel exited with an error message and nonzero status code, right? Or did something else happen initially?

In my opinion manual fixing shouldn't be required for every error that occurs during building packages.

That is certainly the ideal, but it's not always as easy as it sounds. Of course I strive to make it work like this, but then I need clear bug reports when it doesn't do what's expected :-). Or are you making an implicit suggestion about a general workaround or fallback to make things more robust?

Additionally tmp folder doesn't guarantee file persistence event between two shell commands, so opening of temporary files should be better handled.

I've never heard this concrete statement before, even though there is clearly a certain amount of truth to it. What do you suggest otherwise? Use /var/tmp instead of /tmp? Or does that have the same problem? Do you have other suggestions?


On a more general note, I'll try to reproduce the issue you've described and see if I can fix it.

xolox commented 9 years ago

Without follow up from @serathius I don't know what I should be fixing here and I asked for details quite a while ago but never got any, so there's no way for me to resolve the problem (whatever it is). This is why I'm going to go ahead and close this issue. If @serathius feels like following up here by answering my questions then please feel free to reopen this issue.