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

rofiles: Fix --copyup when creating a new file #1396

Closed
wants to merge 1 commit into from

Conversation

cgwalters
Copy link
Member

This tripped up the docbook-dtds %post in my experiments
with doing rpm-ostree for buildroots.

I cloned and built xfstests
but haven't yet investigated actually running it.

In the meantime let's do the obvious fix here; we need to distinguish
between "copyup enabled" and "actually did a copyup" in the open path
at least, since if we didn't do a copyup we don't need to re-open.

This tripped up the `docbook-dtds` `%post` in my experiments
with doing rpm-ostree for buildroots.

I cloned and built [xfstests](https://git.kernel.org/pub/scm/fs/xfs/xfstests-dev.git)
but haven't yet investigated actually running it.

In the meantime let's do the obvious fix here; we need to distinguish
between "copyup enabled" and "actually did a copyup" in the open path
at least, since if we didn't do a copyup we don't need to re-open.
@jlebon
Copy link
Member

jlebon commented Jan 8, 2018

since if we didn't do a copyup we don't need to re-open

The patch makes sense, though can you expand on how this breaks things? This is just an optimization, right? If we didn't actually copy up but opt_copyup is TRUE, there's no harm in closing and reopening, right?

@cgwalters
Copy link
Member Author

If we didn't actually copy up but opt_copyup is TRUE, there's no harm in closing and reopening, right?

Right, except (this goes back to a comment you previously made IIRC being prescient) since we're dropping O_CREAT things break - since the "second" open is really the first.

@jlebon
Copy link
Member

jlebon commented Jan 8, 2018

@rh-atomic-bot r+ b707a07

@rh-atomic-bot
Copy link

⚡ Test exempted: pull fully rebased and already tested.

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.

None yet

3 participants