diff mbox series

[3/3] kernel.bbclass: use kernel_version_sanity_check where defined

Message ID 20240227170902.3718203-3-ejo@pengutronix.de
State New
Headers show
Series [1/3] kernel.bbclass: slightly fix wording, case, and spaces in version check | expand

Commit Message

Enrico Jörns Feb. 27, 2024, 5:09 p.m. UTC
The task 'do_kernel_version_sanity_check' was defined in kernel.bbclass
but used in kernel-yocto.bbclass only.

Since the task does not depend on any kernel-yocto-specific task
(anymore), move it to the kernel.bbclass so the check can run for all
kernels.

If it turns out that this causes too many noise for people that are not
interested in a consistency between ${PV} and the kernel version, an
option could be to let KERNEL_VERSION_SANITY_SKIP weakly default to "1"
in kernel.bbclass or alternatively move the entire code to
kernel-yocto.bbclass.

Signed-off-by: Enrico Jörns <ejo@pengutronix.de>
---
 meta/classes-recipe/kernel-yocto.bbclass | 1 -
 meta/classes-recipe/kernel.bbclass       | 2 ++
 2 files changed, 2 insertions(+), 1 deletion(-)

Comments

Bruce Ashfield Feb. 27, 2024, 5:39 p.m. UTC | #1
On Tue, Feb 27, 2024 at 12:09 PM Enrico Jörns <ejo@pengutronix.de> wrote:
>
> The task 'do_kernel_version_sanity_check' was defined in kernel.bbclass
> but used in kernel-yocto.bbclass only.
>
> Since the task does not depend on any kernel-yocto-specific task
> (anymore), move it to the kernel.bbclass so the check can run for all
> kernels.
>
> If it turns out that this causes too many noise for people that are not
> interested in a consistency between ${PV} and the kernel version, an
> option could be to let KERNEL_VERSION_SANITY_SKIP weakly default to "1"
> in kernel.bbclass or alternatively move the entire code to
> kernel-yocto.bbclass.

The check is actually quite annoying / noisy when working on updating a
kernel.

So we may get complaints :)

Again, I don't have a strong opinion, since the functionality is unchanged
for linux-yocto

Bruce

>
> Signed-off-by: Enrico Jörns <ejo@pengutronix.de>
> ---
>  meta/classes-recipe/kernel-yocto.bbclass | 1 -
>  meta/classes-recipe/kernel.bbclass       | 2 ++
>  2 files changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/meta/classes-recipe/kernel-yocto.bbclass b/meta/classes-recipe/kernel-yocto.bbclass
> index 854e4681d5..b7d74b7ab8 100644
> --- a/meta/classes-recipe/kernel-yocto.bbclass
> +++ b/meta/classes-recipe/kernel-yocto.bbclass
> @@ -729,6 +729,5 @@ python () {
>  }
>
>  # extra tasks
> -addtask kernel_version_sanity_check after do_patch before do_compile
>  addtask validate_branches before do_patch after do_kernel_checkout
>  addtask kernel_configcheck after do_configure before do_compile
> diff --git a/meta/classes-recipe/kernel.bbclass b/meta/classes-recipe/kernel.bbclass
> index 837064cef7..3c805fd96f 100644
> --- a/meta/classes-recipe/kernel.bbclass
> +++ b/meta/classes-recipe/kernel.bbclass
> @@ -514,6 +514,8 @@ do_kernel_version_sanity_check() {
>         exit 0
>  }
>
> +addtask kernel_version_sanity_check after do_patch before do_compile
> +
>  addtask shared_workdir after do_compile before do_compile_kernelmodules
>  addtask shared_workdir_setscene
>
> --
> 2.39.2
>
diff mbox series

Patch

diff --git a/meta/classes-recipe/kernel-yocto.bbclass b/meta/classes-recipe/kernel-yocto.bbclass
index 854e4681d5..b7d74b7ab8 100644
--- a/meta/classes-recipe/kernel-yocto.bbclass
+++ b/meta/classes-recipe/kernel-yocto.bbclass
@@ -729,6 +729,5 @@  python () {
 }
 
 # extra tasks
-addtask kernel_version_sanity_check after do_patch before do_compile
 addtask validate_branches before do_patch after do_kernel_checkout
 addtask kernel_configcheck after do_configure before do_compile
diff --git a/meta/classes-recipe/kernel.bbclass b/meta/classes-recipe/kernel.bbclass
index 837064cef7..3c805fd96f 100644
--- a/meta/classes-recipe/kernel.bbclass
+++ b/meta/classes-recipe/kernel.bbclass
@@ -514,6 +514,8 @@  do_kernel_version_sanity_check() {
 	exit 0
 }
 
+addtask kernel_version_sanity_check after do_patch before do_compile
+
 addtask shared_workdir after do_compile before do_compile_kernelmodules
 addtask shared_workdir_setscene