Skip to content
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

lib/commit: fix checking flag with bitwise OR #1290

Closed
wants to merge 1 commit into from

Conversation

jlebon
Copy link
Member

@jlebon jlebon commented Oct 18, 2017

Caught by Coverity.

Coverity CID: 1458339

Caught by Coverity.

Coverity CID: 1458339
jlebon referenced this pull request Oct 18, 2017
For checkouts that are on the same device, for regular files we can simply
"adopt" existing files. This is useful in the "build from subtrees" pattern that
happens with e.g. `rpm-ostree install` as well as flatpak and gnome-continuous.

New files are things like an updated `ldconfig` cache, etc. And particularly for
`rpm-ostree` we always regenerate the rpmdb, which for e.g. this workstation is
`61MB`.

We probably should have done this from the start, and instead had a `--copy`
flag to commit, but obviously we have to be backwards compatible.

There's more to do here - the biggest gap is probably for `bare-user` repos,
which are often used with things like `rpm-ostree compose tree` for host
systems. But we can do that later.

Closes: #1272
Approved by: jlebon
@pwithnall
Copy link
Member

@rh-atomic-bot r+ a7b88c6

@cgwalters
Copy link
Member

I've been tempted to have a _flag_is_set(int f, int v) helper or something, like if (_flag_is_set(flags, WRITE_DIR_CONTENT_FLAGS_CAN_ADOPT)).

@rh-atomic-bot r+ a7b88c6

@rh-atomic-bot
Copy link

💡 This pull request was already approved, no need to approve it again.

@rh-atomic-bot
Copy link

⌛ Testing commit a7b88c6 with merge 2902e36...

rh-atomic-bot pushed a commit that referenced this pull request Oct 18, 2017
Caught by Coverity.

Coverity CID: 1458339

Closes: #1290
Approved by: pwithnall
@rh-atomic-bot
Copy link

💔 Test failed - status-atomicjenkins

@jlebon
Copy link
Member Author

jlebon commented Oct 18, 2017

That's projectatomic/papr#69. Should be fixed soon.
@rh-atomic-bot retry

@rh-atomic-bot
Copy link

⌛ Testing commit a7b88c6 with merge 18b85fa...

@rh-atomic-bot
Copy link

☀️ Test successful - status-atomicjenkins
Approved by: cgwalters
Pushing 18b85fa to master...

@jlebon jlebon deleted the pr/coverity-fix branch June 14, 2018 01:50
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.

4 participants