microsoft / vcpkg

C++ Library Manager for Windows, Linux, and MacOS
MIT License
21.76k stars 6.05k forks source link

7zip 22+ extracts timestamps, which messes with buildsystems #38500

Open russelltg opened 2 weeks ago

russelltg commented 2 weeks ago

After upgrading to 7zip 22, it extracts timestamps that are in archives, which is undesirable. I reported a similar issue for linux at #33714 a while ago, which got fixed. Unfortunately, it doesn't seem there is any equivalent flag to -DD in 7zip, so it unconditionally extracts timestamps which results in build failures due to some sources not being rebuilt because the timestamp has gone backwards (or is just in the past)

Link to someone else running into something similar: https://sourceforge.net/p/sevenzip/discussion/45797/thread/816678c1b5/

I believe the relevant variable in 7zip is CArchiveExtractCallback::Write_MTime, which is unconditionally set to true.

Possible fixes here are

  1. Downgrade 7zip
  2. Send a patch to 7zip to expose a flag for this, wait for a release, update
  3. Manually touch files

Environment

To Reproduce Steps to reproduce the behavior: Same as #33714, but on Windows

Expected behavior Modify times are set to current time