]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
populate_sdk_ext: set noexec flag for some tasks ChenQi/SDK-noexec
authorChen Qi <Qi.Chen@windriver.com>
Wed, 13 May 2015 06:40:09 +0000 (14:40 +0800)
committerChen Qi <Qi.Chen@windriver.com>
Wed, 13 May 2015 10:09:07 +0000 (18:09 +0800)
For the SDK, what we are interested in is the sysroot part. So the
only useful task is do_populate_sysroot. Other tasks like do_package
don't need to run. So mark them as 'noexec' for SDK.

This would result in two benefits:
1) The size of extensible SDK is larged reduced. For example, extensible
   SDK for core-image-minimal is reduced from 1.8G to 793M.
2) The installation time is reduced as a lot of tasks are not run.

[YOCTO #7590]

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
meta/classes/populate_sdk_ext.bbclass

index dc2c58e2d184851b0953b4c3401190046e5e7c4d..6c265b8426f9485a03b559e6eef2280e282eec8b 100644 (file)
@@ -141,8 +141,18 @@ python copy_buildsystem () {
     sigfile = d.getVar('WORKDIR', True) + '/locked-sigs.inc'
     oe.copy_buildsystem.generate_locked_sigs(sigfile, d)
 
+    # Mark tasks to be 'noexec' for the SDK as we only need the sysroot part
+    base_class_path = os.path.join(baseoutpath, core_meta_subdir, 'classes', 'base.bbclass')
+    if os.path.exists(base_class_path):
+        with open(base_class_path, 'a') as f:
+            noexec_tasks = ['do_package', 'do_packagedata', 'do_package_qa', 'do_package_write_rpm',
+                            'do_package_write_ipk', 'do_package_write_deb', 'do_deploy', 'do_populate_lic',
+                            'do_rootfs']
+            for t in noexec_tasks:
+                f.write('%s[noexec] = "1"\n' % t)
+
     # Filter the locked signatures file to just the sstate tasks we are interested in
-    allowed_tasks = ['do_populate_lic', 'do_populate_sysroot', 'do_packagedata', 'do_package_write_ipk', 'do_package_write_rpm', 'do_package_write_deb', 'do_package_qa', 'do_deploy']
+    allowed_tasks = ['do_populate_sysroot']
     excluded_targets = d.getVar('SDK_TARGETS', True)
     lockedsigs_pruned = baseoutpath + '/conf/locked-sigs.inc'
     oe.copy_buildsystem.prune_lockedsigs(allowed_tasks,