Common copy logic shared between install and cp in uucore? #6872
DaringCuteSeal
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Upon investigating an issue with
install(#5080) after my package build with Arch Linux'smakepkgfailed, I discovered that the latter bug also affectscp:Looking at uutils'
installsource code, it seems that it uses the copy functionality fromfs::copydirectly. Sincecphas some other optimizations (like sparse copying), this makesinstallless performant in some cases. I took a look at GNU'sinstalland they seem to havesparse_modeset to automatic by default to enable copying optimizations. I think that it would be a good idea to place a copy subroutine (that also handles special files) in uucore, as suggested by a comment under the issue I mentioned earlier.Now, if this is relevant, I have some questions in regards to the code migration. How much of
cpshould be moved touucore? Is it the whole thing—like with GNU's, so we get the wholecpas API? Or is it just one or a few functions that does copy optimizations directly without other logic handling? The problem with the latter is that bothcp(the app) and the copy underuucorewould have so much duplicates since they are quite coupled (but I need to make the uucore copy code functional on its own). Besides,uucoreonly hasthiserrorwhilecpusesquick-errorand not unifying them would be quite unclean I think.Beta Was this translation helpful? Give feedback.
All reactions