Skip to content

Commit

Permalink
Merge pull request containers#642 from travier/print-update-from
Browse files Browse the repository at this point in the history
Print previous version too when updating
  • Loading branch information
HuijingHei authored Apr 22, 2024
2 parents 0533a7c + 17c5628 commit 561305d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/bootupd.rs
Original file line number Diff line number Diff line change
Expand Up @@ -431,7 +431,7 @@ pub(crate) fn client_run_update(c: &mut ipc::ClientToDaemonConnection) -> Result
continue;
}
ComponentUpdateResult::Updated {
previous: _,
previous,
interrupted,
new,
} => {
Expand All @@ -441,6 +441,7 @@ pub(crate) fn client_run_update(c: &mut ipc::ClientToDaemonConnection) -> Result
i.version,
);
}
println!("Previous {}: {}", name, previous.version);
println!("Updated {}: {}", name, new.version);
}
}
Expand Down
1 change: 1 addition & 0 deletions tests/e2e-update/e2e-update-in-vm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ tmpefimount=$(mount_tmp_efi)
assert_not_has_file ${tmpefimount}/EFI/fedora/test-bootupd.efi

bootupctl update | tee out.txt
assert_file_has_content out.txt "Previous EFI: .*"
assert_file_has_content out.txt "Updated EFI: ${TARGET_GRUB_PKG}.*,test-bootupd-payload-1.0"

assert_file_has_content ${tmpefimount}/EFI/fedora/test-bootupd.efi test-payload
Expand Down

0 comments on commit 561305d

Please sign in to comment.