Fixed: $ ./update.py -l meta-oe,not_existed It should report error that "not_existed" doesn't exist, but it didn't, this was because __in matches any of them.
Signed-off-by: Robert Yang <liezhi.y...@windriver.com> --- layerindex/update.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/layerindex/update.py b/layerindex/update.py index d5c56cd..54b9f87 100755 --- a/layerindex/update.py +++ b/layerindex/update.py @@ -152,10 +152,13 @@ def main(): sys.exit(1) if options.layers: - layerquery = LayerItem.objects.filter(classic=False).filter(name__in=options.layers.split(',')) - if layerquery.count() == 0: - logger.error('No layers matching specified query "%s"' % options.layers) - sys.exit(1) + layers = options.layers.split(',') + for layer in layers: + layerquery = LayerItem.objects.filter(classic=False).filter(name=layer) + if layerquery.count() == 0: + logger.error('No layers matching specified query "%s"' % layer) + sys.exit(1) + layerquery = LayerItem.objects.filter(classic=False).filter(name__in=layers) else: # We deliberately exclude status == 'X' ("no update") here layerquery = LayerItem.objects.filter(classic=False).filter(status='P') -- 2.10.2 -- _______________________________________________ yocto mailing list yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/yocto