-
Notifications
You must be signed in to change notification settings - Fork 195
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
tests: Fix rsync of base rpmdb with sqlite #2436
Conversation
Apparently small rpmdb changes can cause the size to stay the same due to preallocation, and rsync defaults to skipping files based on (name, size, mtime). It's really ostree's mtime canonicalization that's unfortunate here. Anyways, we obviously don't care about performance here so use `-I` to disable that rsync check. (Also remove the `mkdir -p` since it's not necessary since a long time) Closes: coreos#2435
2c0e8d1
to
b82f30e
Compare
(Also we should really rewrite this in Rust and stick it in |
I'd really like to see |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: cgwalters, lucab The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Yes, moved that to ostreedev/ostree#2259 |
One option, that might sound a little crazy, but could solve issues is to change the canonicalization. Instead of setting it to 1970-01-01T00:00:00Z we could encode the SHA of the file in the timestamp. If you took the top 28 bits (7 hex chars) the timestamp would still be in the 70s so obviously artificial. We could even squeeze another 7 hex chars in the nanosecond field if we fancied. Tools like rsync could then continue to use (name, size, date) to identify whether something's changed. You still wouldn't be able to use the timestamp to determine orderings of modifications a la |
That's an interesting idea! I think it might fix about half the timestamp issues? Could be confusing to some tools if the timestamp goes backwards, but OTOH agree that it'd fix this rsync case. |
Apparently small rpmdb changes can cause the size to stay the
same due to preallocation, and rsync defaults to skipping files
based on (name, size, mtime). It's really ostree's mtime canonicalization
that's unfortunate here.
Anyways, we obviously don't care about performance here so use
-I
to disable that rsync check.(Also remove the
mkdir -p
since it's not necessary since a long time)Closes: #2435