On Mon, Feb 28, 2022 at 10:14 PM Gao Xiang <[email protected]> wrote: > > > (Or maybe just "--preserve-mtime" if it's supposed to be used frequently in > specific use cases...)
Looking at this again - is a new flag needed? If -T is specified, the build will be reproducible. All timestamps will be equal, and we'll never force an extended inode due to mismatching timestamps. The patch has no effect in this case. If -T is *not* specified, inode mtime *could* be reproducible (depending on how the user creates the files), but sbi.build_time isn't. Any of these inodes that gets the compact layout will use the unreproducible build time instead. So, switching to extended inodes here strictly improves reproducibility and determinism. That said, it is a change in behavior, so maybe that warrants a flag anyway. For what it's worth, in AOSP, "-T" is specified for production builds. Non-production builds have "mtime" preserved for pushing incremental changes. Best, -David
