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

Fix the --always-copy bug (with new unit test) #496

Closed
wants to merge 3 commits into from

Conversation

vldmit
Copy link

@vldmit vldmit commented Nov 7, 2013

This fixes the IOError bug with mentioned in issues #495 and #344, I've also added a unit test.

@ionelmc
Copy link

ionelmc commented Nov 8, 2013

This is fairly critical bug (cannot use virtualenv on file system that doesn't support symlinks), please release this fix soon.

@qwcode
Copy link

qwcode commented Nov 15, 2013

marked for 1.11

cp_or_ln(os.path.abspath(os.path.join(home_dir, subdir_name)), \
os.path.join(local_path, subdir_name))
copyfileordir(os.path.abspath(os.path.join(home_dir, subdir_name)), \
os.path.join(local_path, subdir_name), symlink)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't follow this change.
can you give a reproducible case I can use to know what you're fixing here?

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i.e the IOError mentioned in #495 is fixed with the other one-line change, not this.
your commit for this part says "Fix —always-copy to work with "posix_local" install scheme platforms (Ubuntu)"
that what's need an explanation for.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

latter is just DRY fix, symlink check is redundant as it is already defined in copyfile. It looks that copyfileordir() should be changed to copyfile() though. Should I change or remove those at all?

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

with the test suite being poor, It's hard to be sure, os.symlink will be equal to copyfile(symlink=True) for this scenario.
I'm inclined to say pull this part out, unless @pfmoore feels different. He added all the symlink kwargs to these functions.

@qwcode qwcode mentioned this pull request Dec 6, 2013
@qwcode
Copy link

qwcode commented Dec 6, 2013

closing, see PR #511, which is a minor adjustment to this which preserves 2 of the commits.

@qwcode qwcode closed this Dec 6, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants