]> code.ossystems Code Review - openembedded-core.git/commitdiff
devtool: build-image: generate notification callback
authorEd Bartosh <ed.bartosh@linux.intel.com>
Sun, 30 Aug 2015 15:32:47 +0000 (18:32 +0300)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 31 Aug 2015 10:36:54 +0000 (11:36 +0100)
Added notification callback to <image>.bbapend to notify
user that image is modified by build-image plugin.

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
scripts/lib/devtool/build-image.py

index 341ab28d8eacfa9ebb522e9904359aa07db06109..d246fad0e36938f24fb4a18f2740367378e946ef 100644 (file)
@@ -55,6 +55,15 @@ def build_image(args, config, basepath, workspace):
         with open(appendfile, 'w') as afile:
             afile.write('IMAGE_INSTALL_append = " %s"\n' % ' '.join(recipes))
 
+            # Generate notification callback devtool_warn_image_extended
+            afile.write('do_rootfs[prefuncs] += "devtool_warn_image_extended"\n\n')
+            afile.write("python devtool_warn_image_extended() {\n")
+            afile.write("    bb.plain('NOTE: %%s: building with additional '\n"
+                        "             'packages due to \"devtool build-image\"'"
+                        "              %% d.getVar('PN', True))\n"
+                        "    bb.plain('NOTE: delete %%s to clear this' %% \\\n"
+                        "             '%s')\n" % os.path.relpath(appendfile, basepath))
+            afile.write("}\n")
     try:
         exec_build_env_command(config.init_path, basepath,
                                'bitbake %s' % image, watch=True)