Skip to content

Commit

Permalink
Print previous version too when updating
Browse files Browse the repository at this point in the history
This was easy.

Closes: #445
  • Loading branch information
cgwalters committed May 5, 2023
1 parent dee940f commit ee88ffb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
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

0 comments on commit ee88ffb

Please sign in to comment.