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

status: Fully ignore images with rpm-ostree changes #185

Merged
merged 1 commit into from
Nov 7, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 14 additions & 13 deletions lib/src/status.rs
Original file line number Diff line number Diff line change
Expand Up @@ -110,10 +110,13 @@ fn boot_entry_from_deployment(
) -> Result<BootEntry> {
let repo = &sysroot.repo();
let (image, incompatible) = if let Some(origin) = deployment.origin().as_ref() {
if let Some(image) = get_image_origin(origin)? {
let incompatible = crate::utils::origin_has_rpmostree_stuff(origin);
let image = if incompatible {
// If there are local changes, we can't represent it as a bootc compatible image.
None
} else if let Some(image) = get_image_origin(origin)? {
let image = ImageReference::from(image);
let csum = deployment.csum();
let incompatible = crate::utils::origin_has_rpmostree_stuff(origin);
let imgstate = ostree_container::store::query_image_commit(repo, &csum)?;
let config = imgstate.configuration.as_ref();
let labels = config.and_then(labels_of_config);
Expand All @@ -127,18 +130,16 @@ fn boot_entry_from_deployment(
let version = config
.and_then(ostree_container::version_for_config)
.map(ToOwned::to_owned);
(
Some(ImageStatus {
image,
version,
timestamp,
image_digest: imgstate.manifest_digest,
}),
incompatible,
)
Some(ImageStatus {
image,
version,
timestamp,
image_digest: imgstate.manifest_digest,
})
} else {
(None, false)
}
None
};
(image, incompatible)
} else {
(None, false)
};
Expand Down
Loading