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

Print previous version too when updating #472

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
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
6 changes: 4 additions & 2 deletions src/bootupd.rs
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,7 @@ pub(crate) fn client_run_update(c: &mut ipc::ClientToDaemonConnection) -> Result
continue;
}
ComponentUpdateResult::Updated {
previous: _,
previous,
interrupted,
new,
} => {
Expand All @@ -348,7 +348,9 @@ pub(crate) fn client_run_update(c: &mut ipc::ClientToDaemonConnection) -> Result
i.version,
);
}
println!("Updated {}: {}", name, new.version);
println!("Updated {}", name);
println!(" Previous: {}", previous.version);
println!(" Current: {}", new.version);
}
}
updated = true;
Expand Down
3 changes: 2 additions & 1 deletion tests/e2e-update/e2e-update-in-vm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,8 @@ 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 "Updated EFI: ${TARGET_GRUB_PKG}.*,test-bootupd-payload-1.0"
assert_file_has_content out.txt "Updated EFI"
assert_file_has_content out.txt " Current.*${TARGET_GRUB_PKG}.*,test-bootupd-payload-1.0"

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

Expand Down