]> code.ossystems Code Review - openembedded-core.git/commitdiff
devtool: prevent extract/modify use with image recipes
authorPaul Eggleton <paul.eggleton@linux.intel.com>
Thu, 19 Feb 2015 16:40:01 +0000 (16:40 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 23 Feb 2015 08:08:19 +0000 (08:08 +0000)
There wouldn't be any point to using these with an image recipe, so
disallow it.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
scripts/lib/devtool/standard.py

index 3a8c66c131f42dfb25a50d4f8b14be6b27e6003a..9ab3aa608cfbf37733be7cb3f7ecffe20d9c9ac1 100644 (file)
@@ -141,6 +141,10 @@ def _extract_source(srctree, keep_temp, devbranch, d):
         logger.error("The %s recipe uses a shared workdir which this tool does not currently support" % pn)
         return None
 
+    if bb.data.inherits_class('image', d):
+        logger.error("The %s recipe is an image, and therefore is not supported by this tool" % pn)
+        return None
+
     if bb.data.inherits_class('externalsrc', d) and d.getVar('EXTERNALSRC', True):
         logger.error("externalsrc is currently enabled for the %s recipe. This prevents the normal do_patch task from working. You will need to disable this first." % pn)
         return None
@@ -290,6 +294,10 @@ def modify(args, config, basepath, workspace):
         return -1
     rd = oe.recipeutils.parse_recipe(recipefile, tinfoil.config_data)
 
+    if bb.data.inherits_class('image', rd):
+        logger.error("The %s recipe is an image, and therefore is not supported by this tool" % args.recipename)
+        return None
+
     initial_rev = None
     commits = []
     srctree = os.path.abspath(args.srctree)