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

Add previous container image state #499

Merged
merged 1 commit into from
Jul 27, 2023

Conversation

lukewarmtemp
Copy link
Contributor

@lukewarmtemp lukewarmtemp commented Jul 11, 2023

Prerequisite for the rpm-ostree upgrade --check issue: coreos/rpm-ostree#4486

Implemented:

  • previous_state LayeredImageState object added to the PreparedImport object
  • export_as_string() function is added to the ManifestDiff object

Note: The previous_state member of the struct is not actually used in the rpm-ostree issue stated above. Only the export_as_string() is used. However, the changes may see use in the future and can probably be left in.

See commit message for more details.

@lukewarmtemp lukewarmtemp force-pushed the add-previous-state-manifest branch 3 times, most recently from 3f126b9 to fd4e558 Compare July 19, 2023 18:17
lib/src/container/mod.rs Outdated Show resolved Hide resolved
@lukewarmtemp lukewarmtemp force-pushed the add-previous-state-manifest branch 2 times, most recently from 24aacc4 to caca293 Compare July 24, 2023 17:31
lib/src/container/mod.rs Outdated Show resolved Hide resolved
@jmarrero
Copy link
Member

@lukewarmtemp https://github.com/ostreedev/ostree-rs-ext/actions/runs/5682576042/job/15401438954?pr=499 looks like you need to run cargo fmt on mod.rs.

lib/src/container/mod.rs Outdated Show resolved Hide resolved
lib/src/container/mod.rs Outdated Show resolved Hide resolved
This commit is a prerequisite to issue #4176 in the rpm-ostree repo,
implementing the `rpm-ostree upgrade --check` feature for ostree native
containers.

A previous_state `LayeredImageState` object is added to the
`PreparedImport` object, used to store the previous container state when
importing a container image.

A `export_as_string()` function is added to the `ManifestDiff` object to
allow rpm-ostree to print the manifest diff on the client side. The code
is exactly the same as the existing `print()` function for
`ManifestDiff`, except it returns a string instead of printing out the
diff in the terminal.
@cgwalters cgwalters enabled auto-merge July 27, 2023 20:15
@cgwalters cgwalters merged commit ea853c0 into ostreedev:main Jul 27, 2023
7 checks passed
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