Mailinglist Archive: zypp-devel (84 mails)

< Previous Next >
Re: [zypp-devel] Re: [zypp-commit] r10844 - /trunk/sat-solver/tools/repo_products.c
  • From: Michael Schroeder <mls@xxxxxxx>
  • Date: Thu, 21 Aug 2008 23:01:11 +0200
  • Message-id: <20080821210110.GA9024@xxxxxxx>
On Thu, Aug 21, 2008 at 10:47:52PM +0200, Klaus Kaempf wrote:
* Michael Schroeder <mls@xxxxxxx> [Aug 21. 2008 20:44]:
On Wed, Aug 13, 2008 at 04:06:31PM -0000, kkaempf@xxxxxxxxxxxxxxxx wrote:
Author: kkaempf
Date: Wed Aug 13 18:06:31 2008
New Revision: 10844

URL: http://svn.opensuse.org/viewcvs/zypp?rev=10844&view=rev
Log:
provide solvable:installtime for product solvables
[...]
if (!s)
{
+ struct stat st;
+
s = pool_id2solvable(pool, repo_add_solvable(repo));
repodata_extend(data, s - pool->solvables);
handle = repodata_get_handle(data, s - pool->solvables -
repo->start);
+ if (!fstat(fileno(fp), &st))
+ {
+ repodata_set_num(data, handle, SOLVABLE_INSTALLTIME,
st.st_ctime);

That's the last inode change time. Don't you mean "st.st_mtime"?

Thanks for catching this.

Actually, I was unsure what to use for a 'product' _install_time.
st_mtime didn't seem right since modification != installation. So I
choose st_ctime, assuming that inode changes are less likely.

Well, traditionally access time change is also a inode change, thus
ctime changed on every file access.
Linux seems to be different here, file access seems to only change
atime. Anyway, every write changes both ctime and mtime, so mtime is
the one that changes the fewest.
Unix doesn't maintain a 'creation time' at all.

Cheers,
Michael.

--
Michael Schroeder mls@xxxxxxx
SUSE LINUX Products GmbH, GF Markus Rex, HRB 16746 AG Nuernberg
main(_){while(_=~getchar())putchar(~_-1/(~(_|32)/13*2-11)*13);}
--
To unsubscribe, e-mail: zypp-devel+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: zypp-devel+help@xxxxxxxxxxxx

< Previous Next >
Follow Ups