diff mbox series

[3/3] devtool: remove obsolete SRCTREECOVEREDTASKS handling

Message ID 20240902203154.265515-3-adrian.freihofer@gmail.com
State Accepted, archived
Commit 94ff1be36a1eeef7ddceb4fcf20425a03cd052de
Headers show
Series [1/3] uboot-config: fix devtool modify with kernel-fitimage | expand

Commit Message

Adrian Freihofer Sept. 2, 2024, 8:31 p.m. UTC
From: Adrian Freihofer <adrian.freihofer@siemens.com>

The kernel-yocto.bbclass defines some tasks tasks and it also adds these
tasks to the SRCTREECOVEREDTASKS list. There is no need for devtool to
duplicate this code and override what the kernel-yocto.bbclass already
does.

devtool modify generates a linux-yocto.6.6.bbappend containing:
  SRCTREECOVEREDTASKS="\
    do_fetch \
    do_kernel_checkout \
    do_kernel_configcheck \
    do_unpack \
    do_validate_branches \
  "
  do_patch[noexec] = "1"

linux-yocto set SRCTREECOVEREDTASKS to
  SRCTREECOVEREDTASKS="\
    do_fetch \
    do_kernel_checkout \
    do_kernel_configcheck \
    do_patch \
    do_unpack \
    do_validate_branches \
  "

The code in devtool modify is therefore considered as redundant and
removed.

Signed-off-by: Adrian Freihofer <adrian.freihofer@siemens.com>
---
 scripts/lib/devtool/standard.py | 3 ---
 1 file changed, 3 deletions(-)

Comments

Richard Purdie Sept. 3, 2024, 6:15 a.m. UTC | #1
On Mon, 2024-09-02 at 22:31 +0200, Adrian Freihofer via lists.openembedded.org wrote:
> From: Adrian Freihofer <adrian.freihofer@siemens.com>
> 
> The kernel-yocto.bbclass defines some tasks tasks and it also adds these
> tasks to the SRCTREECOVEREDTASKS list. There is no need for devtool to
> duplicate this code and override what the kernel-yocto.bbclass already
> does.
> 
> devtool modify generates a linux-yocto.6.6.bbappend containing:
>   SRCTREECOVEREDTASKS="\
>     do_fetch \
>     do_kernel_checkout \
>     do_kernel_configcheck \
>     do_unpack \
>     do_validate_branches \
>   "
>   do_patch[noexec] = "1"
> 
> linux-yocto set SRCTREECOVEREDTASKS to
>   SRCTREECOVEREDTASKS="\
>     do_fetch \
>     do_kernel_checkout \
>     do_kernel_configcheck \
>     do_patch \
>     do_unpack \
>     do_validate_branches \
>   "
> 
> The code in devtool modify is therefore considered as redundant and
> removed.
> 
> Signed-off-by: Adrian Freihofer <adrian.freihofer@siemens.com>
> ---
>  scripts/lib/devtool/standard.py | 3 ---
>  1 file changed, 3 deletions(-)
> 
> diff --git a/scripts/lib/devtool/standard.py b/scripts/lib/devtool/standard.py
> index 312eb8ab506..b2e1a6ca3a5 100644
> --- a/scripts/lib/devtool/standard.py
> +++ b/scripts/lib/devtool/standard.py
> @@ -952,9 +952,6 @@ def modify(args, config, basepath, workspace):
>                  f.write('EXTERNALSRC_BUILD:pn-%s = "%s"\n' % (pn, srctree))
>  
>              if bb.data.inherits_class('kernel', rd):
> -                f.write('SRCTREECOVEREDTASKS = "do_validate_branches do_kernel_checkout '
> -                        'do_fetch do_unpack do_kernel_configcheck"\n')
> -                f.write('\ndo_patch[noexec] = "1"\n')
>                  f.write('\ndo_kernel_configme:prepend() {\n'
>                          '    if [ -e ${S}/.config ]; then\n'
>                          '        mv ${S}/.config ${S}/.config.old\n'


Note that "kernel" != "linux-yocto". Does a standard kernel still need fetch/unpack?

Cheers,

Richard
Adrian Freihofer Sept. 3, 2024, 7:33 p.m. UTC | #2
On Tue, 2024-09-03 at 07:15 +0100, Richard Purdie wrote:
> On Mon, 2024-09-02 at 22:31 +0200, Adrian Freihofer via
> lists.openembedded.org wrote:
> > From: Adrian Freihofer <adrian.freihofer@siemens.com>
> > 
> > The kernel-yocto.bbclass defines some tasks tasks and it also adds
> > these
> > tasks to the SRCTREECOVEREDTASKS list. There is no need for devtool
> > to
> > duplicate this code and override what the kernel-yocto.bbclass
> > already
> > does.
> > 
> > devtool modify generates a linux-yocto.6.6.bbappend containing:
> >   SRCTREECOVEREDTASKS="\
> >     do_fetch \
> >     do_kernel_checkout \
> >     do_kernel_configcheck \
> >     do_unpack \
> >     do_validate_branches \
> >   "
> >   do_patch[noexec] = "1"
> > 
> > linux-yocto set SRCTREECOVEREDTASKS to
> >   SRCTREECOVEREDTASKS="\
> >     do_fetch \
> >     do_kernel_checkout \
> >     do_kernel_configcheck \
> >     do_patch \
> >     do_unpack \
> >     do_validate_branches \
> >   "
> > 
> > The code in devtool modify is therefore considered as redundant and
> > removed.
> > 
> > Signed-off-by: Adrian Freihofer <adrian.freihofer@siemens.com>
> > ---
> >  scripts/lib/devtool/standard.py | 3 ---
> >  1 file changed, 3 deletions(-)
> > 
> > diff --git a/scripts/lib/devtool/standard.py
> > b/scripts/lib/devtool/standard.py
> > index 312eb8ab506..b2e1a6ca3a5 100644
> > --- a/scripts/lib/devtool/standard.py
> > +++ b/scripts/lib/devtool/standard.py
> > @@ -952,9 +952,6 @@ def modify(args, config, basepath, workspace):
> >                  f.write('EXTERNALSRC_BUILD:pn-%s = "%s"\n' % (pn,
> > srctree))
> >  
> >              if bb.data.inherits_class('kernel', rd):
> > -                f.write('SRCTREECOVEREDTASKS =
> > "do_validate_branches do_kernel_checkout '
> > -                        'do_fetch do_unpack
> > do_kernel_configcheck"\n')
> > -                f.write('\ndo_patch[noexec] = "1"\n')
> >                  f.write('\ndo_kernel_configme:prepend() {\n'
> >                          '    if [ -e ${S}/.config ]; then\n'
> >                          '        mv ${S}/.config
> > ${S}/.config.old\n'
> 
> 
> Note that "kernel" != "linux-yocto". Does a standard kernel still
> need fetch/unpack?

externalsrc.bbclass defaults to:
SRCTREECOVEREDTASKS ?= "do_patch do_unpack do_fetch"
https://git.yoctoproject.org/poky/tree/meta/classes/externalsrc.bbclass#n28
This should be fine for "kernel" != "linux-yocto".

I will send a v2 which mentions this in the commit message and fixes
the other finding with the uppercase PN.

Thank you for the review.
Adrian


> 
> Cheers,
> 
> Richard
>
diff mbox series

Patch

diff --git a/scripts/lib/devtool/standard.py b/scripts/lib/devtool/standard.py
index 312eb8ab506..b2e1a6ca3a5 100644
--- a/scripts/lib/devtool/standard.py
+++ b/scripts/lib/devtool/standard.py
@@ -952,9 +952,6 @@  def modify(args, config, basepath, workspace):
                 f.write('EXTERNALSRC_BUILD:pn-%s = "%s"\n' % (pn, srctree))
 
             if bb.data.inherits_class('kernel', rd):
-                f.write('SRCTREECOVEREDTASKS = "do_validate_branches do_kernel_checkout '
-                        'do_fetch do_unpack do_kernel_configcheck"\n')
-                f.write('\ndo_patch[noexec] = "1"\n')
                 f.write('\ndo_kernel_configme:prepend() {\n'
                         '    if [ -e ${S}/.config ]; then\n'
                         '        mv ${S}/.config ${S}/.config.old\n'