On 7/22/21 6:16 AM, Bruce Ashfield wrote:
>
>
> On Thu, Jul 22, 2021 at 8:47 AM Nicolas Dechesne
> <[email protected] <mailto:[email protected]>> 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 <[email protected]
>     <mailto:[email protected]>>
>     ---
>      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
>
>
> 
>

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

Reply via email to