File tree Expand file tree Collapse file tree 2 files changed +13
-1
lines changed
Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -391,7 +391,12 @@ pub(crate) fn status() -> Result<Status> {
391391 // adoptable list, and adoption proceeds automatically.
392392 //
393393 // Therefore, calling `query_adopt_state()` alone is sufficient.
394- if let Some ( adopt_ver) = crate :: component:: query_adopt_state ( ) ? {
394+ if let Some ( adopt_ver) = component:: query_adopt_state ( ) ? {
395+ let component = component:: new_from_name ( & name) ?;
396+ // Skip if the update metadata could not be found
397+ if component. query_update ( & sysroot) ?. is_none ( ) {
398+ continue ;
399+ } ;
395400 ret. adoptable . insert ( name. to_string ( ) , adopt_ver) ;
396401 } else {
397402 log:: trace!( "Not adoptable: {}" , name) ;
Original file line number Diff line number Diff line change @@ -115,6 +115,13 @@ bootupctl update | tee out.txt
115115assert_file_has_content_literal out.txt ' No update available for any component'
116116assert_not_file_has_content_literal out.txt ' Updated EFI'
117117
118+ # Verify that we skipped update if update metadata not found
119+ mount -o remount,rw /boot
120+ rm -f /boot/bootupd-state.json ${bootupdir} /BIOS.json
121+ bootupctl update | tee out.txt
122+ assert_file_has_content out.txt ' Adopted and updated: EFI: grub2-.*'
123+ assert_not_file_has_content out.txt ' Adopted and updated: BIOS:'
124+
118125echo " some additions" >> ${tmpefisubdir} /${shimx64}
119126if bootupctl validate 2> err.txt; then
120127 fatal " unexpectedly passed validation"
You can’t perform that action at this time.
0 commit comments