All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Armin Kuster" <akuster808@gmail.com>
To: Bruce Ashfield <bruce.ashfield@gmail.com>,
	Nicolas Dechesne <nicolas.dechesne@linaro.org>
Cc: Patches and discussions about the oe-core layer
	<openembedded-core@lists.openembedded.org>
Subject: Re: [OE-core] [PATCH 4/4] yocto-check-layer: ensure that all layer dependencies are tested too
Date: Thu, 22 Jul 2021 06:22:54 -0700	[thread overview]
Message-ID: <f18aa33a-6ebb-8f1a-e047-6d97d441773c@gmail.com> (raw)
In-Reply-To: <CADkTA4MfOnbxF5c9MyfD79r_pmN0Yw4KH6Gx5mjSR1nYkA9Wgg@mail.gmail.com>



On 7/22/21 6:16 AM, Bruce Ashfield wrote:
>
>
> On Thu, Jul 22, 2021 at 8:47 AM Nicolas Dechesne
> <nicolas.dechesne@linaro.org <mailto:nicolas.dechesne@linaro.org>> wrote:
>
>     In order to be compliant with the YP compatible status, a layer also
>     needs to ensure that all its dependencies are compatible
>     too. Currently yocto-check-layer only checks the requested layer,
>     without testing any dependencies.
>
>
> Is that actually written into our compliance statements ? (that
> dependency layers must also be compliant)
>
> I had never heard that before, and in my opinion, that will actively
> encourage people to copy recipes if they want to be compliant but a
> dependent layer is problematic.

Yes it is. 

-Armin
>  
>
>
>     With this change, all dependencies are also checked by default, so the
>     summary printed at the end will give a clear picture whether all
>     dependencies pass the script or not. 
>
>     Using --no-auto-dependency can be used to skip that.
>
>
> I'd actually prefer the opposite, to make the compliance runs faster
> by default, versus someone having to find out about this option later.
> We already get complaints about check layer speed, and doing more by
> default won't help on that front.
>
> Bruce
>
>  
>
>     Signed-off-by: Nicolas Dechesne <nicolas.dechesne@linaro.org
>     <mailto:nicolas.dechesne@linaro.org>>
>     ---
>      scripts/yocto-check-layer | 19 ++++++++++++++++++-
>      1 file changed, 18 insertions(+), 1 deletion(-)
>
>     diff --git a/scripts/yocto-check-layer b/scripts/yocto-check-layer
>     index a179240fd0..e3a4c940ec 100755
>     --- a/scripts/yocto-check-layer
>     +++ b/scripts/yocto-check-layer
>     @@ -24,7 +24,7 @@ import scriptpath
>      scriptpath.add_oe_lib_path()
>      scriptpath.add_bitbake_lib_path()
>
>     -from checklayer import LayerType, detect_layers, add_layers,
>     add_layer_dependencies, get_signatures, check_bblayers
>     +from checklayer import LayerType, detect_layers, add_layers,
>     add_layer_dependencies, get_layer_dependencies, get_signatures,
>     check_bblayers
>      from oeqa.utils.commands import get_bb_vars
>
>      PROGNAME = 'yocto-check-layer'
>     @@ -51,6 +51,8 @@ def main():
>                  help='File to output log (optional)', action='store')
>          parser.add_argument('--dependency', nargs="+",
>                  help='Layers to process for dependencies',
>     action='store')
>     +    parser.add_argument('--no-auto-dependency', help='Disable
>     automatic testing of dependencies',
>     +            action='store_true')
>          parser.add_argument('--machines', nargs="+",
>                  help='List of MACHINEs to be used during testing',
>     action='store')
>          parser.add_argument('--additional-layers', nargs="+",
>     @@ -121,6 +123,21 @@ def main():
>          if not layers:
>              return 1
>
>     +    # Find all dependencies, and get them checked too
>     +    if not args.no_auto_dependency:
>     +        depends = []
>     +        for layer in layers:
>     +            layer_depends = get_layer_dependencies(layer,
>     dep_layers, logger)
>     +            if layer_depends:
>     +                for d in layer_depends:
>     +                    if d not in depends:
>     +                        depends.append(d)
>     +
>     +        for d in depends:
>     +            if d not in layers:
>     +                logger.info <http://logger.info>("Adding %s to
>     the list of layers to test, as a dependency", d['name'])
>     +                layers.append(d)
>     +
>          shutil.copyfile(bblayersconf, bblayersconf + '.backup')
>          def cleanup_bblayers(signum, frame):
>              shutil.copyfile(bblayersconf + '.backup', bblayersconf)
>     -- 
>     2.29.2
>
>
>
>
>
>
> -- 
> - Thou shalt not follow the NULL pointer, for chaos and madness await
> thee at its end
> - "Use the force Harry" - Gandalf, Star Trek II
>
>
> 
>


  reply	other threads:[~2021-07-22 13:22 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-22 12:46 [PATCH 0/4] yocto-check-layer: add support to check for dependencies Nicolas Dechesne
2021-07-22 12:46 ` [PATCH 1/4] yocto-check-layer: improve missed dependencies Nicolas Dechesne
2021-07-22 12:46 ` [PATCH 2/4] checklayer: new function get_layer_dependencies() Nicolas Dechesne
2021-07-22 12:46 ` [PATCH 3/4] checklayer: rename _find_layer_depends Nicolas Dechesne
2021-07-22 12:46 ` [PATCH 4/4] yocto-check-layer: ensure that all layer dependencies are tested too Nicolas Dechesne
2021-07-22 13:16   ` [OE-core] " Bruce Ashfield
2021-07-22 13:22     ` Armin Kuster [this message]
2021-07-22 20:46     ` Richard Purdie
2021-07-23  3:29       ` Bruce Ashfield
2021-07-22 12:51 ` [OE-core] [PATCH 0/4] yocto-check-layer: add support to check for dependencies Richard Purdie
2021-07-22 13:00   ` Nicolas Dechesne
2021-07-30  8:02 ` Richard Purdie
2021-07-30  9:08   ` Nicolas Dechesne
2021-07-30  9:27     ` Richard Purdie
2021-08-02 10:35       ` Nicolas Dechesne
2021-08-02 14:57         ` Steve Sakoman
2021-08-02 15:04           ` Richard Purdie
2021-08-02 15:07             ` Steve Sakoman
2021-08-04  2:14               ` Denys Dmytriyenko
2021-08-04 15:10                 ` Steve Sakoman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=f18aa33a-6ebb-8f1a-e047-6d97d441773c@gmail.com \
    --to=akuster808@gmail.com \
    --cc=bruce.ashfield@gmail.com \
    --cc=nicolas.dechesne@linaro.org \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.