Skip to content

do_not_package_if_src_was_modified spurious errors #6717

@ehuss

Description

@ehuss

do_not_package_if_src_was_modified is failing on macos CI with:

Expected: execs
    but: exited with exit code: 0

Cargo is not able to always detect a modification during packaging on low-resolution filesystems like HFS if the package is extracted and build.rs runs within 1 second.

This is caused by #6257. Previously the timestamps of the original files were in the past, but now the timestamps are all set to the extraction time.

Some options to fix:

  1. Change tar to optionally set timestamps, but ignore errors.
  2. Disable do_not_package_if_src_was_modified on macos.
  3. Change run_verify to use a better method for detecting modifications.
  4. Revert Configure tar to not set mtime #6257. Cargo may set mtimes in other places (see Rebuild on mid build file modification #6484).
    a. Note: I cannot reproduce Failure to package on FAT-family filesystems #6238. I tried creating various FAT partitions on Windows 8 and Windows 10, and they all seemed to be able to set file times just fine. How can I repro it?

Any thoughts/preferences?

I get about 20% failure locally. Seen recently at

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions