Of course, another solution would simply be to use the link() and unlink() C functions instead of the cp and rm calls. This would save the forked process and eliminate the dependency.
The purpose of the program is to make backups of directories, so that isn't a viable solution.
]]>You can run a system quite happily without coreutils... Look at busybox.
And that actually brings up another point...my package doesn't specifically need coreutils, it just needs some implementation of cp and rm, regardless of who provides it.
Ultimately I think I've decided to put glibc in the depends and leave coreutils out, since while it's certainly possible to have a box without coreutils, I don't think I've ever seen a functional *nix OS without cp or rm.
]]>You can run a system quite happily without coreutils... Look at busybox.
to be more exactly you can replace the GNU part on GNU/Linux for... well... busybox, zsh, llvm+clang and who know what more.
I think arch need a writted policity on this issue, you know, the "is not writted therefor not obligatory blablablah" argument can raise at some point.
]]>EDIT: just found it, yup, it looks like coreutils would be needed. (edit again, crossposed with the below).
Ok, I'll include that as well then. Thanks!
]]>If this is not for building, I'm curious how you would use cp or rm without also requiring a shell. Is this C code using an exec family function to run cp or rm? Or if it is C code and you use system() that requires a shell. Or perahps are /usr/bin/cp and /usr/bin/rm called from a service file? I can't think of other ways they'd be used without also requiring a shell. If a shell is needed, just put `sh` as a dependency as all the POSIX shells provide that. (edit: oops, no they don't it seems. They should).
EDIT: just found it, yup, it looks like coreutils would be needed. (edit again, crossposed with the below).
]]>There's no official policy about including packages from the base group. Some packagers include them, others don't. Personally, I'm in the "include them" camp.
Note that base-devel is only assumed at build time, not at run time.
Include them. Although an Arch system without glibc has issues...
Ok, based on both of your input and looking at other packages, I think I will include glibc but not coreutils. If I do 'pacman -Qi coreutils' on my system there's only 5 packages that list it as a dependency, as opposed to ~50 that list glibc. Plus, the only reason it needs coreutils is for cp and rm, and a system without those commands probably can't even run a package manager let alone install my package
Thanks!
]]>Note that base-devel is only assumed at build time, not at run time.
]]>Thanks for the confirmation.
]]>and
https://wiki.archlinux.org/index.php?ti … did=356560
EDIT: using the little tip in the 2nd link shows that both glibc and coreutils end in a 0 exit code meaning they are including in base-devel or pulled in by a dep in base-devel so no need to include them.
]]>PS: I apologize if this has been asked before, but I couldn't find anything specific when I searched for this.
]]>