[Rpm-maint] [rpm-software-management/rpm] RFE: Subsecond resolution of package installation time (Issue #3934)
Petr Pisar
notifications at github.com
Wed Sep 10 12:13:30 UTC 2025
ppisar created an issue (rpm-software-management/rpm#3934)
When a package is installed, an installation time (RPMTAG_INSTALLTIME) is recorded as a UNIX time in unsigned 32-bit integer. In DNF we provide tools for reporting processes whose start time predates their installation time (of all its recursive dependencies) (e.g. DNF4's needs-restarting program).
This method of comparison suffers from false negatives when the process is started in the same second as the package was installed. An example is a package which restarts its daemon in its own %post script <https://github.com/rpm-software-management/dnf-plugins-core/issues/590>.
The cause is a rounding of the installation time to whole seconds done by time(2) syscall which is used as a time source in RPM. Provided today's machines are fast enough to install a program and start it in the same second, I conclude that it would be useful for RPM to track the installation time with a subsecond resolution.
Subsecond resolution won't fix the false negatives completely because there still be some rounding, but has a potential to diminish it significantly. E.g. gettimeofday(2) returns time with microsecond resolution.
Please consider enhancing RPM database format and RPM API to provide the installation time with an subsecond resultion. E.g. the SQLite database could gain a new column storing a microsecond remainder (defaulting to 0) from the currently stored UNIX time. And the API could gain a new tag for retrieving that remainder. This way it the enhancement would be fully compatible.
--
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/issues/3934
You are receiving this because you are subscribed to this thread.
Message ID: <rpm-software-management/rpm/issues/3934 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20250910/4df6130f/attachment.htm>
More information about the Rpm-maint
mailing list