On Fri, Nov 19, 2010 at 06:00:45PM +0000, Peter Dennis wrote:
> Hello,
> 
> A question on timestamps when files are delivered to a system.
> 
> o when doing the install the files receive timestamps based
>   upon the time of the install:
> 
>  machine1:
>  ls -l -% all ant
>  -rwxr-xr-x   1 root     bin         9807 Mar 30  2010 ant
>           timestamp: atime         Nov 17 12:44:40 2010
>           timestamp: ctime         Mar 30 13:28:51 2010
>           timestamp: mtime         Mar 30 13:28:51 2010
>           timestamp: crtime         Mar 30 13:28:51 2010
> 
>  machine2:
>  ls -l -% all ant
>  -rwxr-xr-x   1 root     bin         9807 Oct 13 18:21 ant
>           timestamp: atime         Nov 17 12:55:10 2010
>           timestamp: ctime         Oct 13 18:21:53 2010
>           timestamp: mtime         Oct 13 18:21:53 2010
>           timestamp: crtime         Oct 13 18:21:53 2010
> 
>  machine3:
>   ls -l -% all ant
>  -rwxr-xr-x   1 root     bin         9807 Nov 10 14:03 ant
>           timestamp: atime         Nov 17 12:49:56 2010
>           timestamp: ctime         Nov 10 14:03:21 2010
>           timestamp: mtime         Nov 10 14:03:21 2010
>           timestamp: crtime         Nov 10 14:03:21 2010
> 
> I note that for file actions there is a timestamp attribute but it
> is only used for very few ON files.
> 
> Should the mtime be consistent across installs ?

I'm afraid you'll need to provide some more information.  Does the ant
file have a timestamp in its manifest?  If so, that's what the atime and
mtime should be set to.  Otherwise, you're depending on implementation
specific behavior.  The code in action.file makes a temporary file, and
copies the content of the file in the download cache into that tempfile.
The tempfile is then renamed to the name of the file that's being
installed.  The transport will preserve the file times from the remote
side on download, but the install code doesn't copy over the atime/mtime
attributes right now -- unless there's a timestamp in the manifest --
because there hasn't really been any need. 

-j
_______________________________________________
pkg-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/pkg-discuss

Reply via email to