Commit Graph

4 Commits

Author SHA1 Message Date
Harald Sitter
8e3cafae79 mtimer: start the search for a dir time with unix(0)
if the dir is newer than the files then we still want to force it to a
consistent value of the files

most notably this should prevent a whole host of dirs from having an
mtime that is the package unpack time, which is obviously changing
between builds
2025-08-26 07:35:39 +02:00
Harald Sitter
bf5f2dd160 give dirs a stable time
with file mtimes stabilized, we now have dirs lighting up like a
christmas tree in my diff scripts. give them a stable mtime to get
consistency between builds.

the idea here is that if we set the mtime of all dirs to their latest
content's mtime we'll implicitly stabilize the dirs through stabilizing
the files

somewhat unfortunately we need to do this in a single thread because
otherwise we'd have to segment deep trees and I really don't want to
venture there for such an otherwise simple program

a future option might be to also put dirs in our json but realistically
that only makes a difference for empty dirs (since they have no content
from which to derive the mtime). so let's see where we get with this. we
can always add dir records in the json later
2025-08-26 06:35:24 +02:00
Harald Sitter
806f85a40a marshal condensed json
preciously recovers a byte or two
2025-08-26 06:35:23 +02:00
Harald Sitter
9719237988 try to produce more consistent mtimes
this is a bit of a shot in the dark, but I believe we may have
unnecessary delta in our images caused by the rebuilding of software on
a daily basis. this would result in mtimes changing when the files
actually do not.

a tiny mtimer tool is meant to work around that by consuming an input
json file of mtimes+checksums and if mtimes change it will checksum the
affected file to verify it actually has changed in content as well.
assuming reproducible builds this should result in far less delta in the
erofs and by extension the delta download
2025-08-25 18:06:43 +02:00