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
fmartinsons@work-pc:~$ touch foo
fmartinsons@work-pc:~$ [ -e foo ] && ls non_existent_file
ls: cannot access 'non_existent_file': No such file or directory
fmartinsons@work-pc:~$ echo $?
2
fmartinsons@work-pc:~$ [ -e foo ] && ls non_existent_file || true
ls: cannot access 'non_existent_file': No such file or directory
fmartinsons@work-pc:~$ echo $?
0
fmartinsons@work-pc:~$ touch existent_file
fmartinsons@work-pc:~$ [ -e foo ] && ls existent_file
existent_file
fmartinsons@work-pc:~$ echo $?
0
fmartinsons@work-pc:~$
I think the origin of your issue is that the action failed , having the log
of kernel_do_install task would help.
# Must be ran no earlier than after do_kernel_checkout or else Makefile
> won't be in ${S}/Makefile
> @@ -555,7 +555,7 @@ do_shared_workdir () {
>
> # Copy files required for module builds
> cp System.map $kerneldir/System.map-${KERNEL_VERSION}
> - [ -e Module.symvers ] && cp Module.symvers $kerneldir/
> + [ -e Module.symvers ] && cp Module.symvers $kerneldir/ || true
> cp .config $kerneldir/
> mkdir -p $kerneldir/include/config
> cp include/config/kernel.release
> $kerneldir/include/config/kernel.release
> --
> 2.40.1
>
>
>
>
>
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#185389):
https://lists.openembedded.org/g/openembedded-core/message/185389
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]]
-=-=-=-=-=-=-=-=-=-=-=-