Attached is patch to extend RPMTAG_{BUILDTIME,INSTALLTIME,INSTALLTID} to add a
2nd element that contains a struct timespec tspec.tv_nsec 2nd element.
There are 2 new getters/setters added to the rpmts API: rpm{Get,Set}Tid2().
About the only subtlety (so far) is the need (for rpmdb "legacy compatibility")
to index only tspec.tv_secs in RPMDBI_INSTALLTID. A better index could be
attempted, but the value of the Installed index w/o --rollback is questionable.
Using a UUIDv1 timestamp would be one possible choice for a more precise
RPMDBI_INSTALLTID key.
These are the reasons (that I know of) to increase the precision of time stamps:
0) time(2) is very last century (but still doing the job).
1) INSTALLTIME can be inaccurate these days: fast processors can install
multiple packages/second.
2) INSTALLTID was designed to be unique: adding microsecs/nanosecs helps ensure
the uniqueness.
3) UUIDv1 time stamps are likelier to be unique if generated with a high
precision time stamp.
[rpm+tstamp.patch.gz](https://github.com/rpm-software-management/rpm/files/912203/rpm.tstamp.patch.gz)
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/issues/197#issuecomment-293156091
_______________________________________________
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint