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

Add a flag to ignore stale build directories #1078

Closed
Julian opened this issue Jul 24, 2013 · 3 comments
Closed

Add a flag to ignore stale build directories #1078

Julian opened this issue Jul 24, 2013 · 3 comments
Labels
auto-locked Outdated issues that have been locked by automation
Milestone

Comments

@Julian
Copy link
Contributor

Julian commented Jul 24, 2013

I get PreviousBuildDirErrors quite often now from just trying to press through installing a package while incrementally getting it to go further in its installation process.

I certainly appreciate the new politeness here, but I think it'd be useful to have a flag to tell pip to ignore any build directories so that I don't have to keep cleaning up after pip each time I install.

@qwcode
Copy link
Contributor

qwcode commented Jul 24, 2013

in pip-1.4 the build dir is cleaned when pip install fails with an exception (unless you're using --no-clean or --no-install). I just checked that scenario again using one of our test packages that's designed to fail upon install, and we have tests for it.

what flags are you using? can you paste your command and output.

separate from whether to add a flag, I do notice one big problem. when the PreviousBuild exception is raised, the clean still occurs in the finally block. that needs to be fixed. pip is being cautious, and then still deletes it anyway. : (
(@jezdez, please hold patch release for a fix for this)

pip does have delete markers, but it's for the whole build dir, not package by package. we could delete the whole build dir upon finding a pre-existing package sub-dir, but that concerned me when I thought about this before.

we could add package-level delete markers, but note that I really want to move away from these static build locations (and use mktempd) as part of #906.

@qwcode
Copy link
Contributor

qwcode commented Jul 24, 2013

I think I know what may be happening. I'm guessing these are global installs and the build dir is something like /tmp/pip-build-<user>

only in pip-1.4 is there logic to add a delete marker to global build dirs, so if you have this dir already (which most people will), you won't have the delete marker, and the clean routine won't/can't do anything.

so, in addition to fixing the problem above, I'm thinking about (with @dstufft ) changing the default build dir name so that pip-1.4 installs will lay down a new dir and build marker, and people won't struggle with this.

@Julian
Copy link
Contributor Author

Julian commented Jul 24, 2013

Yup nice guess they were global.

Thanks for addressing so quickly, I'll try to apply the patch and see how things go (though I hear you guys have a release coming up).

jezdez added a commit that referenced this issue Jul 27, 2013
@jezdez jezdez closed this as completed Jul 27, 2013
@lock lock bot added the auto-locked Outdated issues that have been locked by automation label Jun 6, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Jun 6, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
auto-locked Outdated issues that have been locked by automation
Projects
None yet
Development

No branches or pull requests

3 participants