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

checkout: Support a "pure addition" mode #714

Closed
wants to merge 2 commits into from

Conversation

cgwalters
Copy link
Member

I plan to use this for rpm-ostree livefs.
coreos/rpm-ostree#639

@cgwalters cgwalters added the WIP label Mar 2, 2017
@cgwalters
Copy link
Member Author

WIP due to lack of tests, cmdline wrapper.

cgwalters added a commit to cgwalters/rpm-ostree that referenced this pull request Mar 2, 2017
WIP due to missing tests and docs.

But I've been playing with this interactively, and it's at a useful place
already. The primary target here is supporting live addition of new packages,
while *also* allowing people to do completely arbitrary replacement if that's
what they want.

Depends:
  GNOME/libglnx#36
  ostreedev/ostree#714

Closes: coreos#639
cgwalters added a commit to cgwalters/rpm-ostree that referenced this pull request Mar 2, 2017
WIP due to missing tests and docs.

But I've been playing with this interactively, and it's at a useful place
already. The primary target here is supporting live addition of new packages,
while *also* allowing people to do completely arbitrary replacement if that's
what they want.

Depends:
  GNOME/libglnx#36
  ostreedev/ostree#714

Closes: coreos#639
cgwalters added a commit to cgwalters/rpm-ostree that referenced this pull request Mar 2, 2017
WIP due to missing tests and docs.

But I've been playing with this interactively, and it's at a useful place
already. The primary target here is supporting live addition of new packages,
while *also* allowing people to do completely arbitrary replacement if that's
what they want.

Depends:
  GNOME/libglnx#36
  ostreedev/ostree#714

Closes: coreos#639
@cgwalters cgwalters removed the WIP label Mar 3, 2017
@cgwalters
Copy link
Member Author

Now with tests ✅ - removing WIP.

{
/* In this mode, we keep existing content. Still need to mark the hardlink as supported.
*/
ret_was_supported = TRUE;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One concern with this is that the kernel checks for EEXISTS before checking whether hardlinking is supported. So we can't really assert this, right? Looking at checkout_one_file_at(), it relies on this info to update the devino cache, which will be wrong after this. Maybe add e.g. out_exists also so callers can distinguish this?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oooh. That's a good catch. That would have been spectacularly painful to debug later.

@cgwalters
Copy link
Member Author

Ok, rebased 🏄, added a prep patch and a fixup.

cancellable, error))
{
g_prefix_error (error, "Using new cached uncompressed hardlink of %s to %s: ", checksum, destination_name);
goto out;
}

need_copy = !did_hardlink;
need_copy = hardlink_res == HARDLINK_RESULT_NOT_SUPPORTED;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Parentheses on these, please!

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done ⬇️

@jlebon
Copy link
Member

jlebon commented Mar 6, 2017

Nice! Looks like some tests might need to be adjusted to grep for the new error message.

At least in all Linux kernels up to today, one can never `link()` across
devices, so we might as well verify that up front. This will help for a future
patch to add a new type of union-add checkout, since Linux checks for `EEXIST`
before `EXDEV`.
I plan to use this for `rpm-ostree livefs`.
coreos/rpm-ostree#639
@cgwalters
Copy link
Member Author

Eh, my fixups went wrong, I just squashed to simplify. One of the bugs was we need to initialize hardlink_res, since it's not set if we're not going to try to hardlink.

@jlebon
Copy link
Member

jlebon commented Mar 6, 2017

@rh-atomic-bot r+ 0188b3c

@rh-atomic-bot
Copy link

⌛ Testing commit 0188b3c with merge 94948e3...

rh-atomic-bot pushed a commit that referenced this pull request Mar 6, 2017
I plan to use this for `rpm-ostree livefs`.
coreos/rpm-ostree#639

Closes: #714
Approved by: jlebon
@rh-atomic-bot
Copy link

☀️ Test successful - status-atomicjenkins
Approved by: jlebon
Pushing 94948e3 to master...

cgwalters added a commit to cgwalters/rpm-ostree that referenced this pull request Mar 11, 2017
WIP due to missing tests and docs.

But I've been playing with this interactively, and it's at a useful place
already. The primary target here is supporting live addition of new packages,
while *also* allowing people to do completely arbitrary replacement if that's
what they want.

Depends:
  GNOME/libglnx#36
  ostreedev/ostree#714

Closes: coreos#639
cgwalters added a commit to cgwalters/rpm-ostree that referenced this pull request Mar 16, 2017
WIP due to missing tests and docs.

But I've been playing with this interactively, and it's at a useful place
already. The primary target here is supporting live addition of new packages,
while *also* allowing people to do completely arbitrary replacement if that's
what they want.

Depends:
  GNOME/libglnx#36
  ostreedev/ostree#714

Closes: coreos#639
cgwalters added a commit to cgwalters/rpm-ostree that referenced this pull request Mar 17, 2017
WIP due to missing tests and docs.

But I've been playing with this interactively, and it's at a useful place
already. The primary target here is supporting live addition of new packages,
while *also* allowing people to do completely arbitrary replacement if that's
what they want.

Depends:
  GNOME/libglnx#36
  ostreedev/ostree#714

Closes: coreos#639
cgwalters added a commit to cgwalters/rpm-ostree that referenced this pull request Mar 18, 2017
But I've been playing with this interactively, and it's at a useful place
already. The primary target here is supporting live addition of new packages,
while *also* allowing people to do completely arbitrary replacement if that's
what they want.

Depends:
  GNOME/libglnx#36
  ostreedev/ostree#714

Closes: coreos#639
cgwalters added a commit to cgwalters/rpm-ostree that referenced this pull request Mar 20, 2017
But I've been playing with this interactively, and it's at a useful place
already. The primary target here is supporting live addition of new packages,
while *also* allowing people to do completely arbitrary replacement if that's
what they want.

Depends:
  GNOME/libglnx#36
  ostreedev/ostree#714

Closes: coreos#639
cgwalters added a commit to cgwalters/rpm-ostree that referenced this pull request Mar 22, 2017
But I've been playing with this interactively, and it's at a useful place
already. The primary target here is supporting live addition of new packages,
while *also* allowing people to do completely arbitrary replacement if that's
what they want.

Depends:
  GNOME/libglnx#36
  ostreedev/ostree#714

Closes: coreos#639
cgwalters added a commit to cgwalters/rpm-ostree that referenced this pull request Mar 22, 2017
But I've been playing with this interactively, and it's at a useful place
already. The primary target here is supporting live addition of new packages,
while *also* allowing people to do completely arbitrary replacement if that's
what they want.

Depends:
  GNOME/libglnx#36
  ostreedev/ostree#714

Closes: coreos#639
cgwalters added a commit to cgwalters/rpm-ostree that referenced this pull request Mar 23, 2017
But I've been playing with this interactively, and it's at a useful place
already. The primary target here is supporting live addition of new packages,
while *also* allowing people to do completely arbitrary replacement if that's
what they want.

Depends:
  GNOME/libglnx#36
  ostreedev/ostree#714

Closes: coreos#639
cgwalters added a commit to cgwalters/rpm-ostree that referenced this pull request Mar 24, 2017
But I've been playing with this interactively, and it's at a useful place
already. The primary target here is supporting live addition of new packages,
while *also* allowing people to do completely arbitrary replacement if that's
what they want.

Depends:
  GNOME/libglnx#36
  ostreedev/ostree#714

Closes: coreos#639
cgwalters added a commit to cgwalters/rpm-ostree that referenced this pull request Mar 27, 2017
But I've been playing with this interactively, and it's at a useful place
already. The primary target here is supporting live addition of new packages,
while *also* allowing people to do completely arbitrary replacement if that's
what they want.

Depends:
  GNOME/libglnx#36
  ostreedev/ostree#714

Closes: coreos#639
cgwalters added a commit to cgwalters/rpm-ostree that referenced this pull request Mar 27, 2017
But I've been playing with this interactively, and it's at a useful place
already. The primary target here is supporting live addition of new packages,
while *also* allowing people to do completely arbitrary replacement if that's
what they want.

Depends:
  GNOME/libglnx#36
  ostreedev/ostree#714

Closes: coreos#639
cgwalters added a commit to cgwalters/rpm-ostree that referenced this pull request Apr 20, 2017
But I've been playing with this interactively, and it's at a useful place
already. The primary target here is supporting live addition of new packages,
while *also* allowing people to do completely arbitrary replacement if that's
what they want.

Depends:
  GNOME/libglnx#36
  ostreedev/ostree#714

Closes: coreos#639
cgwalters added a commit to cgwalters/rpm-ostree that referenced this pull request Apr 26, 2017
But I've been playing with this interactively, and it's at a useful place
already. The primary target here is supporting live addition of new packages,
while *also* allowing people to do completely arbitrary replacement if that's
what they want.

Depends:
  GNOME/libglnx#36
  ostreedev/ostree#714

Closes: coreos#639
cgwalters added a commit to cgwalters/rpm-ostree that referenced this pull request Apr 27, 2017
But I've been playing with this interactively, and it's at a useful place
already. The primary target here is supporting live addition of new packages,
while *also* allowing people to do completely arbitrary replacement if that's
what they want.

Depends:
  GNOME/libglnx#36
  ostreedev/ostree#714

Closes: coreos#639
cgwalters added a commit to cgwalters/rpm-ostree that referenced this pull request Apr 28, 2017
But I've been playing with this interactively, and it's at a useful place
already. The primary target here is supporting live addition of new packages,
while *also* allowing people to do completely arbitrary replacement if that's
what they want.

Depends:
  GNOME/libglnx#36
  ostreedev/ostree#714

Closes: coreos#639
cgwalters added a commit to cgwalters/rpm-ostree that referenced this pull request Apr 28, 2017
But I've been playing with this interactively, and it's at a useful place
already. The primary target here is supporting live addition of new packages,
while *also* allowing people to do completely arbitrary replacement if that's
what they want.

Depends:
  GNOME/libglnx#36
  ostreedev/ostree#714

Closes: coreos#639
cgwalters added a commit to cgwalters/rpm-ostree that referenced this pull request May 1, 2017
But I've been playing with this interactively, and it's at a useful place
already. The primary target here is supporting live addition of new packages,
while *also* allowing people to do completely arbitrary replacement if that's
what they want.

Depends:
  GNOME/libglnx#36
  ostreedev/ostree#714

Closes: coreos#639
cgwalters added a commit to cgwalters/rpm-ostree that referenced this pull request May 1, 2017
But I've been playing with this interactively, and it's at a useful place
already. The primary target here is supporting live addition of new packages,
while *also* allowing people to do completely arbitrary replacement if that's
what they want.

Depends:
  GNOME/libglnx#36
  ostreedev/ostree#714

Closes: coreos#639
cgwalters added a commit to cgwalters/rpm-ostree that referenced this pull request May 8, 2017
But I've been playing with this interactively, and it's at a useful place
already. The primary target here is supporting live addition of new packages,
while *also* allowing people to do completely arbitrary replacement if that's
what they want.

Depends:
  GNOME/libglnx#36
  ostreedev/ostree#714

Closes: coreos#639
cgwalters added a commit to cgwalters/rpm-ostree that referenced this pull request May 9, 2017
But I've been playing with this interactively, and it's at a useful place
already. The primary target here is supporting live addition of new packages,
while *also* allowing people to do completely arbitrary replacement if that's
what they want.

Depends:
  GNOME/libglnx#36
  ostreedev/ostree#714

Closes: coreos#639
cgwalters added a commit to cgwalters/rpm-ostree that referenced this pull request May 10, 2017
But I've been playing with this interactively, and it's at a useful place
already. The primary target here is supporting live addition of new packages,
while *also* allowing people to do completely arbitrary replacement if that's
what they want.

Depends:
  GNOME/libglnx#36
  ostreedev/ostree#714

Closes: coreos#639
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.

3 participants