#1728: Chapter 6 - Package Management - Explain why 'install' is generally safer than 'cp' -----------------------------------------+---------------------------------- Reporter: [EMAIL PROTECTED] | Owner: [email protected] Type: enhancement | Status: new Priority: normal | Milestone: Future Component: Book | Version: SVN Severity: normal | Resolution: Keywords: | -----------------------------------------+---------------------------------- Comment (by [EMAIL PROTECTED]):
I thought I answered this a few days ago, bit I can't find the post. I reviewed the cource code to both install and cp. Both do extensive error checking, but in the end both call a common routine, copy, to actually put the destination file in place. From my review, I am convinced that install is not *safer* than cp, but is a convenience for installers in that it copies and can set permissions and owner/group with one command. Of course there are other switches that are different too, but the safety issue is not there. One comment is that libraries in use are handled better by install. Not so. If you copy over a file that is in use, the inode is updated in the directory, but the original open file is not deleted until the last process that has the file open terminates. There is nothing in install that checks to see if a file is in use. -- Ticket URL: <http://wiki.linuxfromscratch.org/lfs/ticket/1728> LFS Trac <http://wiki.linuxfromscratch.org/lfs/> Linux From Scratch: Your Distro, Your Rules. -- http://linuxfromscratch.org/mailman/listinfo/lfs-book FAQ: http://www.linuxfromscratch.org/lfs/faq.html Unsubscribe: See the above information page
