Message ID | 20230216122338.17270-1-pavel@zhukoff.net |
---|---|
State | Accepted, archived |
Commit | a6372f70f31b39ce9867b705d02205621d7a8685 |
Headers | show |
Series | wic: Fix populating of IMAGE_EFI_BOOT_FILES with uefi-kernel | expand |
On Thu, 2023-02-16 at 13:23 +0100, Pavel Zhukov wrote: > wic plugin crashed if IMAGE_EFI_BOOT_FILES is not empty and uefi-kernel > loader specified because of preliminary return from the function. > [Yocto #15033] > Fixes: > > File "/mnt/builds/yocto/sources/scripts/lib/wic/plugins/source/bootimg-efi.py", line 371, in do_prepare_partition > > for src_path, dst_path in cls.install_task: > > ^^^^^^^^^^^^^^^^ > > AttributeError: type object 'BootimgEFIPlugin' has no attribute 'install_task'. Did you mean: 'do_install_disk'? > > Signed-off-by: Pavel Zhukov <pavel@zhukoff.net> > --- > scripts/lib/wic/plugins/source/bootimg-efi.py | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/scripts/lib/wic/plugins/source/bootimg-efi.py b/scripts/lib/wic/plugins/source/bootimg-efi.py > index 4b00913a70..d6aeab2aad 100644 > --- a/scripts/lib/wic/plugins/source/bootimg-efi.py > +++ b/scripts/lib/wic/plugins/source/bootimg-efi.py > @@ -221,7 +221,7 @@ class BootimgEFIPlugin(SourcePlugin): > elif source_params['loader'] == 'systemd-boot': > cls.do_configure_systemdboot(hdddir, creator, cr_workdir, source_params) > elif source_params['loader'] == 'uefi-kernel': > - return > + pass > else: > raise WicError("unrecognized bootimg-efi loader: %s" % source_params['loader']) > except KeyError: Thanks for finding that! Is there some way we should be tweaking the wic tests to avoid this regressing in future? Cheers, Richard
"Richard Purdie" <richard.purdie@linuxfoundation.org> writes: > On Thu, 2023-02-16 at 13:23 +0100, Pavel Zhukov wrote: >> wic plugin crashed if IMAGE_EFI_BOOT_FILES is not empty and uefi-kernel >> loader specified because of preliminary return from the function. >> [Yocto #15033] >> Fixes: >> > File "/mnt/builds/yocto/sources/scripts/lib/wic/plugins/source/bootimg-efi.py", line 371, in do_prepare_partition >> > for src_path, dst_path in cls.install_task: >> > ^^^^^^^^^^^^^^^^ >> > AttributeError: type object 'BootimgEFIPlugin' has no attribute 'install_task'. Did you mean: 'do_install_disk'? >> >> Signed-off-by: Pavel Zhukov <pavel@zhukoff.net> >> --- >> scripts/lib/wic/plugins/source/bootimg-efi.py | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/scripts/lib/wic/plugins/source/bootimg-efi.py b/scripts/lib/wic/plugins/source/bootimg-efi.py >> index 4b00913a70..d6aeab2aad 100644 >> --- a/scripts/lib/wic/plugins/source/bootimg-efi.py >> +++ b/scripts/lib/wic/plugins/source/bootimg-efi.py >> @@ -221,7 +221,7 @@ class BootimgEFIPlugin(SourcePlugin): >> elif source_params['loader'] == 'systemd-boot': >> cls.do_configure_systemdboot(hdddir, creator, cr_workdir, source_params) >> elif source_params['loader'] == 'uefi-kernel': >> - return >> + pass >> else: >> raise WicError("unrecognized bootimg-efi loader: %s" % source_params['loader']) >> except KeyError: > > Thanks for finding that! > > Is there some way we should be tweaking the wic tests to avoid this > regressing in future? Sure. Seems like bootmgr-efi plugin is not covered by the tests. I'll create some. > > Cheers, > > Richard > > > -=-=-=-=-=-=-=-=-=-=-=- > Links: You receive all messages sent to this group. > View/Reply Online (#177287): https://lists.openembedded.org/g/openembedded-core/message/177287 > Mute This Topic: https://lists.openembedded.org/mt/97004405/6390638 > Group Owner: openembedded-core+owner@lists.openembedded.org > Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [pavel@zhukoff.net] > -=-=-=-=-=-=-=-=-=-=-=-
diff --git a/scripts/lib/wic/plugins/source/bootimg-efi.py b/scripts/lib/wic/plugins/source/bootimg-efi.py index 4b00913a70..d6aeab2aad 100644 --- a/scripts/lib/wic/plugins/source/bootimg-efi.py +++ b/scripts/lib/wic/plugins/source/bootimg-efi.py @@ -221,7 +221,7 @@ class BootimgEFIPlugin(SourcePlugin): elif source_params['loader'] == 'systemd-boot': cls.do_configure_systemdboot(hdddir, creator, cr_workdir, source_params) elif source_params['loader'] == 'uefi-kernel': - return + pass else: raise WicError("unrecognized bootimg-efi loader: %s" % source_params['loader']) except KeyError:
wic plugin crashed if IMAGE_EFI_BOOT_FILES is not empty and uefi-kernel loader specified because of preliminary return from the function. [Yocto #15033] Fixes: | File "/mnt/builds/yocto/sources/scripts/lib/wic/plugins/source/bootimg-efi.py", line 371, in do_prepare_partition | for src_path, dst_path in cls.install_task: | ^^^^^^^^^^^^^^^^ | AttributeError: type object 'BootimgEFIPlugin' has no attribute 'install_task'. Did you mean: 'do_install_disk'? Signed-off-by: Pavel Zhukov <pavel@zhukoff.net> --- scripts/lib/wic/plugins/source/bootimg-efi.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)