[bitbake-devel] [PATCH] bitbake-layers: check layer dependencies before adding

Leonardo Sandoval leonardo.sandoval.gonzalez at linux.intel.com
Fri May 26 13:39:15 UTC 2017


On Fri, 2017-05-26 at 10:19 +0800, Chang Rebecca Swee Fun wrote:

> +                    self.tinfoil.parseRecipes()
> +                except bb.tinfoil.TinfoilUIException:
> +                    # Restore the back up copy of bblayers.conf
> +                    shutil.copy2(backup, bblayers_conf)
> +                    bb.fatal("Parse failure with the specified layer added")

AFAIK, bb.fatal raises an exception, so the return 1 is not needed.

> +                    return 1
> +            else:
> +                for item in notadded:
> +                    sys.stderr.write("Specified layer %s is already in BBLAYERS\n" % item)
> +        finally:
> +            # Remove the back up copy of bblayers.conf
> +            shutil.rmtree(tempdir)
>  
>      def do_remove_layer(self, args):
>          """Remove a layer from bblayers.conf."""
> -- 
> 2.7.4
> 





More information about the bitbake-devel mailing list