repo: Make summary and signature mtime match
authorDan Nicholson <dbn@endlessos.org>
Thu, 25 Apr 2024 03:37:13 +0000 (21:37 -0600)
committerDan Nicholson <dbn@endlessos.org>
Thu, 25 Apr 2024 15:38:50 +0000 (09:38 -0600)
commit60f4592b2c316c40d1adbf0d6622116283675be0
treebe165b5c70fa96e2381b771a3026f5176a846a54
parentffbeff6cd72f06ee3c3e0ee63fc9f5afe1b16316
repo: Make summary and signature mtime match

HTTP servers derive Last-Modified from the modification time of the
file. When used in combination with a Cache-Control max-age value,
having the modification times match means that caches will consider them
expired at the same time. This helps make it more likely that clients
won't receive a cached summary and fresh signature or vice versa.

This makes more sense to do now that the summary and signature are
created in a temporary directory and renamed into place. In the old days
where they were created directly in the repo root, it would be strange
to change the summary mtime when it wasn't actually modified.
src/libostree/ostree-repo.c
tests/test-summary-update.sh