Skip to content

Conversation

@keestux
Copy link

@keestux keestux commented Dec 15, 2025

The create-python-mirror.py script will now set the timestamp of the downloaded files.

Summary

Set the timestamp of the downloaded files as found on the originating server.

Test Plan

Basically run the mirror script and afterwards check the timestamp of newly
downloaded files. The timestamps will be different from the current time.
Files that were already present (with correct checksum) will not be changed.

@keestux keestux force-pushed the feat/timestamp-files-in-mirror branch from 1f3b6b8 to fc224fa Compare December 15, 2025 22:11
@konstin
Copy link
Member

konstin commented Dec 16, 2025

Why do we need the file timestamp for it if we already have the SHA check?

@keestux
Copy link
Author

keestux commented Dec 16, 2025

Why do we need the file timestamp for it if we already have the SHA check?

It's a convenience. I'm copying the downloaded files to some other location with rsync -ia ..., the output will be more informative if unchanged files are skipped. Also, if I want to clean up old files I need useful timestamps.

@konstin
Copy link
Member

konstin commented Dec 16, 2025

I wouldn't manually backdate the timestamps of files, since it can break e.g. the rsync workflow you mentioned, where rsync would then skip those files even though they were actually updated. Since the file doesn't change after the first download, rsync shouldn't re-copy it.

Regarding cleaning up files, it seems that the timestamp is the wrong measure for this (especially backdated ones), and should rather be based on what files the deployment needs.

The create-python-mirror.py script will now set the timestamp of the
downloaded files.
@keestux keestux force-pushed the feat/timestamp-files-in-mirror branch from fc224fa to 203c9a7 Compare December 16, 2025 18:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants