Update copy_dir to include option to merge directories#3270
Update copy_dir to include option to merge directories#3270boegel merged 6 commits intoeasybuilders:developfrom
Conversation
boegel
left a comment
There was a problem hiding this comment.
@Darkless012 see also Darkless012#3
|
@Darkless012 Can you please take a look at easybuilders/easybuild-easyblocks#1989 that is covering similar ground with a different approach, I get the impression we will need to synchronise our approach among that and your upcoming tarball PR |
|
Having the option to merge folders is a nice addition. However, I'd like to point out that it won't solve the issue with |
|
Thank you for noticing, agreed :) |
boegel
left a comment
There was a problem hiding this comment.
lgtm, thanks a lot @Darkless012!
Why is that an issue? It's say it's quite uncommon that two different software packages would include the same files, and hence problems would ensue when copying the files into an already existing directory? This is exactly what traditional package managers do by throwing everything in Am I overlooking something? (I haven't looked at easybuilders/easybuild-easyblocks#1989 in detail yet) |
|
@boegel one thing is to put all executables in a common |
copy_dir is using shutils.copy_tree which throws error when target directory exists.
In Python 3.8 new
dirs_exist_okparameter was added to be able to merge folders as well.The cleanest solution was to mimic this option with distutils copy_tree which does exactly that.
This is needed for Tarball installation in Bundles, because Tarball removes the whole folder, effectively wiping previous installed bundle components. (Fix for Tarball EB will follow)
Please Squash the merge if possible.