Open wolfv opened 1 month ago
@mlschroe: do you remember the reason for performing this division here? Is the comparison of timestamps using another precision?
Yes, there are (or used to be?) different accuracy timestamps around. I think in particular, Windows uses a less accurate timestamp by default. So this division is a normalization step (we also do something like that in rattler).
But now I think a multiplication would be better :)
Note: we should get rid of the serialization thing we do there.
One should probably try to first patch libsolv
locally to test against libmamba
.
SOLVABLE_BUILDTIME is defined to be the time in seconds, that's why the division is there. If you need sub-second resolution, we'll need to add a new SOLVABLE_BUILDTIME_NSEC key or something similar.
Thank you.
For reference, was the choice of second as resolution historically based on Windows'?
It's because both rpm and arch linux use "seconds since epoch" as build time in their package metadata.
Sometimes mamba / libsolv cannot decide what package to choose and falls back to looking at the timestamp of the packages.
This is currently the case on Windows for the vc package.
The timestamp is however seen as equal in libsolv, while in truth it's different between the packages:
I think this comes from a division by 1000 in libsolv: https://github.com/openSUSE/libsolv/blob/081580de9f964aae61d25e1787c37c7ab8b4fa69/ext/repo_conda.c#L302-L304
Which removes the necessary accuracy for this comparison. Maybe we can fix that in libsolv?! :)