[oe-commits] Ed Bartosh : devtool: build-image: generate notification callback

git at git.openembedded.org git at git.openembedded.org
Mon Aug 31 11:44:15 UTC 2015


Module: openembedded-core.git
Branch: master-next
Commit: 53cb00b8af58c326e2a045cd6f8a04a24dc4c1b5
URL:    http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=53cb00b8af58c326e2a045cd6f8a04a24dc4c1b5

Author: Ed Bartosh <ed.bartosh at linux.intel.com>
Date:   Sun Aug 30 18:32:47 2015 +0300

devtool: build-image: generate notification callback

Added notification callback to <image>.bbapend to notify
user that image is modified by build-image plugin.

Signed-off-by: Ed Bartosh <ed.bartosh at linux.intel.com>

---

 scripts/lib/devtool/build-image.py | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/scripts/lib/devtool/build-image.py b/scripts/lib/devtool/build-image.py
index 341ab28..d246fad 100644
--- a/scripts/lib/devtool/build-image.py
+++ b/scripts/lib/devtool/build-image.py
@@ -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)



More information about the Openembedded-commits mailing list