-
Notifications
You must be signed in to change notification settings - Fork 532
REF/FIX: Correct link/copy behavior #1391
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
Conversation
fef7dc5
to
ff1b8e5
Compare
Due to some rebasing, these commits are showing up out of order.
This final change separates the logic of checking and removing old files from that of linking, symlinking and copying. Additionally, the |
@effigies - could you please add a line to CHANGES as well? |
Done. Going to add |
Okay, hopefully Circle will pass now. |
@effigies - could you please merge master to this. we were having some circle + sourceforge issues. |
Attempt to copy and link files from POSIX to FAT, verify we always copy without throwing errors
@effigies - any chance you can work on the failed test on circle? i'd like to get this one merged before release. |
Is there an easy way to reduce the circle tests to just the one? I can add information to the exception for debugging, but the time lag for feedback on Circle is prohibitive. |
you can enable circle on your repo, reduce the examples that are run to just yours, and even ssh in to debug. |
Seems Circle does some weird caching, so we end up with a VM without a kernel modules directory, so fuse can't be |
Is there a preferred way to deal with this? I can catch the If it would be preferable to fix the Circle environment so that fuse filesystems can be used, that's beyond my ability to commit time right now. |
Should pass on at least one CI server, but a hard FUSE requirement is probably too much to demand just to test nipype.
Thinking about it, having a hard dependency on FUSE/fusefat for testing seems too strong. Updated to skip tests if |
Ready for review. |
REF/FIX: Correct link/copy behavior: closes #1387
Added a patch that addresses #1387 by falling back on
copyfile(copy=True)
when symlinking fails. But it seems it might be good to fully work out the cases, now that hard linking is an option, as well.The current logic is:
I see two problems:
os.name == 'posix'
does not guarantee symlinks work, so we need some othercap:symlink
indicator.
copy == False and use_hardlink == True
on a POSIX system uses a symlink when a hard linkcould work and be more in line with the flags.
The following seems like a more intuitive alternative:
With exceptions to detect capabilities, this lends itself to a simple logic:
Do people agree this is worth changing?
As to testing, is there a good way to create and mount a
vfat
filesystem without root? That would permit testingcap:symlink
from a POSIX system.