repo: Add a "force copy" flag to checkout#804
repo: Add a "force copy" flag to checkout#804cgwalters wants to merge 3 commits intoostreedev:masterfrom
Conversation
This is intended to be used for copying `/usr/etc` → `/etc` for deployments. A TODO here is to use `glnx_file_copy_at()` if the repo mode allows it - then we'd use reflinks if available.
| "Cannot specify both --union and --union-add"); | ||
| goto out; | ||
| } | ||
| if (opt_require_hardlinks && opt_force_copy) |
There was a problem hiding this comment.
Should this be checked at the API level too?
tests/basic-test.sh
Outdated
| validate_checkout_basic() { | ||
| (cd $1; | ||
| assert_has_file firstfile | ||
| assert_not_streq $(stat -c '%h' firstfile) 1 |
There was a problem hiding this comment.
Interesting, this is failing in test-basic-user.sh. Surprisingly, not in the -U -H case, but just in the vanilla $OSTREE checkout test2 checkout-test2 test. Is there a bug there? Seems like it's hardlinking from a bare-user repo even without -U.
There was a problem hiding this comment.
Wait, I read this backwards. The fact that it's failing means that it is copying rather than hardlinking, which is what we want in user-mode without -U. So I think this just needs some conditionals around it.
There was a problem hiding this comment.
Yeah, this only works in bare right now. This whole suite really needs rewriting.
|
☀️ Test successful - status-atomicjenkins |
This isn't a new API function so the default rpm detection doesn't work. But we do need a new ostree for ostreedev/ostree#804.
This is intended to be used for copying
/usr/etc→/etcfordeployments.
A TODO here is to use
glnx_file_copy_at()if the repo mode allowsit - then we'd use reflinks if available.