diff options
author | Mark Hatle <mark.hatle@windriver.com> | 2017-03-30 21:30:27 -0500 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-04-05 12:36:44 +0100 |
commit | 57fc8a9771174b7d0533a42c045053adefa537a8 (patch) | |
tree | 525cefab95f1eb32d6c84af17a0a9d53c30c5121 | |
parent | 402ef1c8bd1ea994581a39672f31ab1203a0899d (diff) | |
download | openembedded-core-57fc8a9771174b7d0533a42c045053adefa537a8.tar.gz openembedded-core-57fc8a9771174b7d0533a42c045053adefa537a8.tar.bz2 openembedded-core-57fc8a9771174b7d0533a42c045053adefa537a8.zip |
yocto-compat-layer.py: Add --dependency argument
When processing a large number of items, there are times that it would be
nice to be able to pass in a series of layers that can be used as dependencies
for the layer that is being scanned. This avoids the significant overhead
of processing all of the layers to compatibility.
Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
-rwxr-xr-x | scripts/yocto-compat-layer.py | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/scripts/yocto-compat-layer.py b/scripts/yocto-compat-layer.py index d13d8c039f..f8a1ac7468 100755 --- a/scripts/yocto-compat-layer.py +++ b/scripts/yocto-compat-layer.py @@ -47,6 +47,8 @@ def main(): help='Layer to test compatibility with Yocto Project') parser.add_argument('-o', '--output-log', help='File to output log (optional)', action='store') + parser.add_argument('--dependency', nargs="+", + help='Layers to process for dependencies', action='store') parser.add_argument('-n', '--no-auto', help='Disable auto layer discovery', action='store_true') parser.add_argument('-d', '--debug', help='Enable debug output', @@ -80,6 +82,11 @@ def main(): if not layers: logger.error("Fail to detect layers") return 1 + if args.dependency: + dep_layers = detect_layers(args.dependency, args.no_auto) + dep_layers = dep_layers + layers + else: + dep_layers = layers logger.info("Detected layers:") for layer in layers: @@ -125,7 +132,8 @@ def main(): shutil.copyfile(bblayersconf + '.backup', bblayersconf) - if not add_layer(bblayersconf, layer, layers, logger): + if not add_layer(bblayersconf, layer, dep_layers, logger): + logger.info('Skipping %s due to missing dependencies.' % layer['name']) results[layer['name']] = None results_status[layer['name']] = 'SKIPPED (Missing dependencies)' layers_tested = layers_tested + 1 |