[LFS Trac] #1728: Chapter 6 - Package Management - Explain why 'install' is generally safer than 'cp'

Jeremy Huntwork jhuntwork at linuxfromscratch.org
Tue May 2 18:42:37 PDT 2006

LFS Trac wrote:
>  I thought I answered this a few days ago, bit I can't find the post.  I

I have it in my Inbox, and it *looks* like you commented via Trac - 
though I can't understand why your comment doesn't show up either on the 
mailing list or in Trac itself.

In the meantime, I'll quote your text for posterity's sake:

"Comment (by bdubbs at linuxfromscratch.org):

  I took a look at the install.c source and the cp.c source.  They both 
do extensive error checking, but when it comes down to the final 
operation, both call the same library routine: copy()

  My review has persuaded me that install is '''not''' safer than cp. 
The install utility is merely a convenience for installers to copy the 
file, make prerequsite directories, set permissions and ownership, etc 
all with one command.

  I could find no references in either install or cp that try to 
determine if a file (library) is already loaded in memory.  Indeed, the 
operating system handles that issue automatically and does not actually 
remove the old file until all open references to it are closed, even 
though the entry may be removed from the directory structure.

  The simple am most correct way to address this ticket is to merely 
remove third bullet in section 6.3.1."


More information about the lfs-book mailing list