Date: Tue, 4 Apr 1995 13:50:08 -0600 From: Nate Williams <nate@trout.sri.MT.net> To: Steven G Kargl <kargl@troutmask.apl.washington.edu> Cc: freebsd-hackers@freefall.cdrom.com Subject: Re: new install(1) utility Message-ID: <199504041950.NAA07029@trout.sri.MT.net> In-Reply-To: Steven G Kargl <kargl@troutmask.apl.washington.edu> "Re: new install(1) utility" (Apr 4, 12:13pm)
next in thread | previous in thread | raw e-mail | index | archive | help
> According to Nate Williams: > > > > > (2) -t -- Preserve the timestamp of the source file on target file. > > > > Is the check done within install to see if the source file is the same > > as the target file? If we are going to be pulling out information on > > the original file, it seems to be the best solution to do the check > > inside install. I would also make the Makefiles more clean. :-) > > If I understand your question, then No. I assume you mean that if the > target file already exists, does install compare the source and target > files before installation? No, the target file is unlinked, then replaced. This could cause dependency problems if the source and target files are not the same. > The timestamp is then adjusted to reflect the timestamp of the original > file. I was thinking about the `make depend' step where a newer timestamp > on a header file forces a new dependence check. The timestamp changes because a new file is written over an older (but still the same) file. > It sounds like you want: > > if (source exists && target exists) { > if (strcmp(source, target) == unique files) { > if (cmp(source, target) == same) > exit(0); > else { > do normal installation > } > > Hmmm... this could produce a decent timesavings. Yes, this would in effect do the same thing as the -t option you have now and save a tremendous amount of re-linking of files since the timestamps would not change. Again, this should be a new option, but if it works well it could become a standard install option for those folks who are doing development. For normal use the 'cmp' step shouldn't be used since it will slow down the install process and generally speaking the file should be installed. This would also make incremental updates easier to produce, since only those files which have changes will have different timestamps if someone where to keep a 2.0 tree around. Basically, someone could then do a make install in a fully 2.1 compiled tree and then check to see which files have been modified, and use them for the binary upgarde kit. Nate
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199504041950.NAA07029>