Hi,

On Wed, Aug 02, 2023 at 01:15:34PM +0000, Joel Stanley wrote:
> On Wed, 2 Aug 2023 at 12:45, Frédéric Martinsons
> <[email protected]> wrote:
> >
> >
> >
> > On Wed, 2 Aug 2023 at 13:47, Joel Stanley <[email protected]> wrote:
> >>
> >> The one liner tests using `[ ] && action` need to have || true after the 
> >> action,
> >> otherwise the line returns false and the recipie fails.
> >>
> >> Signed-off-by: Joel Stanley <[email protected]>
> >> ---
> >>  meta/classes-recipe/kernel.bbclass | 4 ++--
> >>  1 file changed, 2 insertions(+), 2 deletions(-)
> >>
> >> diff --git a/meta/classes-recipe/kernel.bbclass 
> >> b/meta/classes-recipe/kernel.bbclass
> >> index 247ef4a48aa7..f1bc41e82be8 100644
> >> --- a/meta/classes-recipe/kernel.bbclass
> >> +++ b/meta/classes-recipe/kernel.bbclass
> >> @@ -486,7 +486,7 @@ kernel_do_install() {
> >>         install -m 0644 System.map 
> >> ${D}/${KERNEL_IMAGEDEST}/System.map-${KERNEL_VERSION}
> >>         install -m 0644 .config 
> >> ${D}/${KERNEL_IMAGEDEST}/config-${KERNEL_VERSION}
> >>         install -m 0644 vmlinux 
> >> ${D}/${KERNEL_IMAGEDEST}/vmlinux-${KERNEL_VERSION}
> >> -       [ -e Module.symvers ] && install -m 0644 Module.symvers 
> >> ${D}/${KERNEL_IMAGEDEST}/Module.symvers-${KERNEL_VERSION}
> >> +       [ -e Module.symvers ] && install -m 0644 Module.symvers 
> >> ${D}/${KERNEL_IMAGEDEST}/Module.symvers-${KERNEL_VERSION} || true
> >>  }
> >>
> >
> > By doing that, you simply silent possible error of the action after the 
> > test, below is a little snippet showing that
> 
> Sure. But the test is looking for the file, so if it doesn't exist
> then the command install won't run.
> 
> I can't think of any realistic situation where install would fail if
> the file is present.
> 
> > I think the origin of your issue is that the action failed , having the log 
> > of kernel_do_install task would help.
> 
> That isn't the case.
> 
> The issue is the Modules.symvers file is not found. This is expected,
> because the kernel does not use modules.

This crucial bit of information is not in the commit message, please add it.

Then, I think there are better ways to detect if kernel modules are disabled
completely. See for example kernel.bbclass line 430:

if (grep -q -i -e '^CONFIG_MODULES=y$' ${B}/.config); then

Cheers,

-Mikko
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#185396): 
https://lists.openembedded.org/g/openembedded-core/message/185396
Mute This Topic: https://lists.openembedded.org/mt/100503145/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to