summaryrefslogtreecommitdiffstats
path: root/meta/classes/rm_work.bbclass
Commit message (Collapse)AuthorAgeFilesLines
* rm_work.bbclass: introduce do_build_without_rm_workPatrick Ohly2017-03-311-3/+24
| | | | | | | | | | | | | | | | | | | | Some classes, for example populate_sdk_ext.bbclass, must be able to trigger a full build of a recipe without also triggering do_rm_work. They cannot depend on do_build anymore, because that would trigger do_rm_work. Instead, do_build_without_rm_work can be used. It has the exact same dependencies as do_build, minus do_rm_work and do_rm_work_all. This may also be useful in a test build of a recipe where one wants to preserve the work directory without having to modify configuration settings: bitbake foobar:do_build_without_rm_work (From OE-Core rev: 04a7b8d6d2e86cc4dd1362c775f5e3ac1eb1d19d) Signed-off-by: Patrick Ohly <patrick.ohly@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rm_work.bbclass: re-enable recursive do_rm_work_allPatrick Ohly2017-03-221-3/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When rewriting the do_rm_work injection, do_rm_work_all had been removed because it seemed obsolete, as do_build now always triggers do_rm_work. However, do_build does not get triggered for all recipes and thus do_rm_work was not called for recipes that got built only partially. For example, zlib depends indirectly on zlib-native:do_populate_sysroot. Because of that dependency, zlib-native got compiled, but do_rm_work was never called for it. Re-introducing do_rm_work_all fixes that by making do_build depend on do_rm_work_all, which then recursively depends on do_rm_work of all dependencies. This has the unintended side-effect that do_rm_work then also triggers additional work (like do_populate_lic) that normally doesn't need to be done for a build. This seems like the lesser evil, compared to an incomplete cleanup because it mostly enables the lighter tasks after do_populate_sysroot. The real solution would be to have two kinds of relationships: a weak ordering relationship ("if A and B are enabled, A must run before B, but B can also run without A") and hard dependencies ("B cannot run unless A has run before"). (From OE-Core rev: b3de5d5795767a4b8c331fa5040166e7e410eeec) Signed-off-by: Patrick Ohly <patrick.ohly@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rm_work.bbclass: clean up soonerPatrick Ohly2017-01-201-11/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Having do_rm_work depend on do_build had one major disadvantage: do_build depends on the do_build of other recipes, to ensure that runtime dependencies also get built. The effect is that when work on a recipe is complete and it could get cleaned up, do_rm_work still doesn't run because it waits for those other recipes, thus leading to more temporary disk space usage than really needed. The right solution is to inject do_rm_work before do_build and after all tasks of the recipe. Achieving that depends on the new bitbake bb.event.RecipeTaskPreProcess and bb.build.preceedtask(). It can't just run in an anonymous function, because other anonymous functions that run later may add more tasks. There's still such a potential conflict when some future RecipeTaskPreProcess event handler also wants to change task dependencies, but that's not a problem now. Should it ever occur, the two handlers will have to know about each other and cooperate to resolve the conflict. Benchmarking (see "rm_work + pybootchart enhancements" on the OE-core mailing list) showed that builds with the modified rm_work.bbclass were both faster (albeit not by much) and required considerably less disk space (14230MiB instead of 18740MiB for core-image-sato). Interestingly enough, builds with rm_work.bbclass were also faster than those without. (From OE-Core rev: 936179754c8d0f98e1196ddc6796fdfd72c0c3b4) Signed-off-by: Patrick Ohly <patrick.ohly@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rm_work.bbclass: allow preserving additional contentPatrick Ohly2017-01-201-1/+9
| | | | | | | | | | | | | | | | | | | | By default, do_rm_work either skips recipes entirely (when listed in RM_WORK_EXCLUDE) or removes everything except for temp. In meta-swupd, virtual image recipes collaborate on producing update data for the base recipe. Tasks running in the base recipe need some information from the virtual images. Those files could be passed via a new shared work directory, but that scatters data in even more places. It's simpler to use the normal WORKDIR and teach rm_work.bbclass to not remove the special output with the new RM_WORK_EXCLUDE_ITEMS. (From OE-Core rev: 28fbb2dd17033308cc09811fbc4f43e2f6c17f54) Signed-off-by: Patrick Ohly <patrick.ohly@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* meta: remove True option to getVar callsJoshua Lock2016-12-161-3/+3
| | | | | | | | | | | | | getVar() now defaults to expanding by default, thus remove the True option from getVar() calls with a regex search and replace. Search made with the following regex: getVar ?\(( ?[^,()]*), True\) (From OE-Core rev: 7c552996597faaee2fbee185b250c0ee30ea3b5f) Signed-off-by: Joshua Lock <joshua.g.lock@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rm_work: add do_write_qemuboot_conf to task listRoss Burton2016-12-131-1/+1
| | | | | | | | | | | | We need to add do_write_qemuboot_conf to the list of tasks to be wiped as otherwise the second time an image is built it will fail. [ YOCTO #10758 ] (From OE-Core rev: 3206f408e908870629eb47afac6249a3c9497a66) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rm_work: Ensure we don't remove sigbasedata filesRichard Purdie2016-11-041-1/+1
| | | | | | | | | We don't remove sigdata files, we also shouldn't remove sigbasedata files as this hinders debugging. (From OE-Core rev: 988349f90c8dc5498b1f08f71e99b13e928a0fd0) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rm_work: don't remove timestamps of image tasksEd Bartosh2016-08-231-8/+4
| | | | | | | | | | | | | Excluded removal of do_bootimg, do_bootdirectdisk and do_vmimg timestamps to prevent unneeded rootfs rebuilds. [YOCTO #10159] (From OE-Core rev: f214da502ad7eda27460dc6f06e9cd29a114f2d2) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/rm_work: use the idle I/O scheduler classRoss Burton2016-06-151-0/+3
| | | | | | | | | | | As rm_work is just cleanup it shouldn't starve more important tasks such as do_compile of I/O, so use BB_TASK_IONICE_LEVEL to run the task in the idle scheduler class. (From OE-Core rev: 6025a14dbbd09b2805fe2e17ddc24f2a515cb832) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rm_work: exclude all kernel recipesMartin Jansa2016-06-071-0/+2
| | | | | | | | | | | | * otherwise kernel is rebuilt every single time and often it fails when building external modules [YOCTO #9352] (From OE-Core rev: 9d23daf03ece06185224f869e9b7f73789689c2d) Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes: Fix do_rootfs referencesRichard Purdie2016-01-111-1/+5
| | | | | | | | | After the separation of do_rootfs, some rootfs references need changing to image_complete. (From OE-Core rev: 59a5f596ca29b1eb8283706e3c60fbb39f9c2c23) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rm_work.bbclass: Exclude do_rootfs stamp removalJate Sujjavanich2015-11-161-0/+4
| | | | | | | | | | | This prevents unneeded rootfs rebuilds if the metadata has not changed while using rm_work. (From OE-Core rev: 7550b13786caa68a9944cd802eb970acbd17e754) Signed-off-by: Jate Sujjavanich <jatedev@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel/rm_work: Improve interactionRichard Purdie2015-05-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | The do_shared_workdir task does leave behind the necessary information in shared-work after it completes. We don't make this a "full" sstate task however since that means tarring up and copying what is usually a large amount of data which would be better extracted straight from the original SCM. The issue with rm_work occurs since it removes the do_shared_workdir stamp meaning subsequent builds will add it back if they need to touch any kernel modules for example. This ends up triggering a near enough complete kernerl rebuild since if configure reruns, populate_sysroot has to rerun. This change promotes the task to have a "setscene" variant but it doesn't use any of the sstate class lifting to generate the sstate file. The sstate function will therefore never get called since the sstate object will never exist. We can add the task to the list of tasks rm_work promotes to a setscene variant and unwanted rebuilds of the kernel should be avoided. (From OE-Core rev: 55b4f7fd217f0c65d457c731150340c18fb3fa19) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rm_work: Fix RM_WORK_EXCLUDE for image/sdk recipesRichard Purdie2015-01-081-0/+8
| | | | | | | | | | | | A previous change meant image/sdk recipes were removed unconditionally by the class and did not respect RM_WORK_EXCLUDE. This fixes that problem. [YOCTO #7114] (From OE-Core rev: 050de16968fe6efeba5d64761b11512549e9fdc2) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rm_work: Speed up rootfs/populate_sdk removalRichard Purdie2014-10-301-0/+13
| | | | | | | | | | | | | | Commands like bitbake X -c rootfs or bitbake X -c populate_sdk do not trigger rm_work to clean up the directories afterwards since it traditionally hooks onto do_build. This change means those two tasks now clean up after themselves. We use the cleandirs function attribute to handle this. [YOCTO #6413] (From OE-Core rev: 6bf06d80c2ce03dfdedac5ad8cf42ef8e36b0ecb) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rm_work.bbclass: ignore failure for removing pseudo folderMing Liu2013-05-241-3/+6
| | | | | | | | | | | | | | | | | | | When building over NFS2/3 server, removal of pseudo folders will fail in some cases for there are files in it still used by pseudo daemon, thus cause ".nfsXXXXX" files generated which can't be removed by clients. This will lead rm_work task fo fail. These failures could be safely ignored because ".nfsXXXXX" files would be automatically cleared by NFS server when no clients keep opening them. [YOCTO #4531] [ CQID: WIND00412051 ] (From OE-Core rev: 9742e866f545bc0d04aca697b541ed88f4e1764a) Signed-off-by: Ming Liu <ming.liu@windriver.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/rm_work: rename RM_WORK_WHITELIST to RM_WORK_EXCLUDE1.4_M5.rc2Paul Eggleton2013-03-261-5/+5
| | | | | | | | | | | This really functions as a blacklist, not a whitelist, since we are listing recipes to exclude. To avoid any possibility of confusion, since this was a recent addition, rename the variable. (From OE-Core rev: 4d56de8018d550b3d181d451900cbfb698d64141) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rm_work.bbclass: inhibit rm_work per recipeChen Qi2013-03-181-0/+13
| | | | | | | | | | | | | | | | | | | | | | Use RM_WORK_WHITELIST to inhibit rm_work per recipe. In this way, one can use rm_work for the most of the recipes but still keep the work area for the recipe(s) one is working on. As an example, the following settings in local.conf will inhibit rm_work for icu-native, icu and busybox. INHERIT += "rm_work" RM_WORK_WHITELIST += "icu-native icu busybox" If we comment out the RM_WORK_WHITELIST line and do a rebuild, the working area of these recipes will be cleaned up. [YOCTO #3675] (From OE-Core rev: 6c930c3c06f2e698540626c87bd7f7f571df35ef) Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rm_work: remove package and packages-split dirsMartin Jansa2013-03-021-7/+13
| | | | | | | | | | | * as described in http://git.openembedded.org/openembedded-core/commit/?id=6107ee294afde395e39d084c33e8e94013c625a9 (From OE-Core rev: 4067afcda78d17058f2aa8d7f82173d181e0aae4) Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* Various typoes fixed, all comments or output strings.Robert P. J. Day2012-03-261-1/+1
| | | | | | | | | Typoes fixed: "enviroment", "editted", "spliting", "scheulder". (From OE-Core rev: 17e981a857a51b0bec08c929e8539d36d83874b6) Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rm_work: keep all sigdata files in stamps dirMartin Jansa2011-05-271-0/+4
| | | | | | | | | | * this makes fix for [YOCTO #1074] in bitbake 139b8a625818225c358a1b8363518d7ed6913188 much more usefull for people using rm_work (From OE-Core rev: 36386f3b8cadf283954f5c6db6ac6ee463c395de) Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rm_work.bbclass: Improve handling of noexec tasksRichard Purdie2011-02-211-0/+9
| | | | Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rm_work.bbclass: Fix typo for package task directory preservationRichard Purdie2011-02-101-2/+2
| | | | Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rm_work: Retain package and package-split directories to be consistent with ↵Richard Purdie2011-02-031-1/+4
| | | | | | sstate code Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rm_work.bbclass: Update to convert stamps to setscene stampsRichard Purdie2011-01-271-0/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We need to manipulate the stamps when removing WORKDIR to indicte that tasks like compile or install can't just rerun. The most effective method to do this is to convert the layout to match that which would have been the case had the system been build from sstate packages. For example, we'd task stamps like: xxx-1.4.7-r3.do_compile xxx-1.4.7-r3.do_configure xxx-1.4.7-r3.do_fetch xxx-1.4.7-r3.do_generate_toolchain_file xxx-1.4.7-r3.do_install xxx-1.4.7-r3.do_package.emenlow xxx-1.4.7-r3.do_package_write xxx-1.4.7-r3.do_package_write_ipk xxx-1.4.7-r3.do_package_write_rpm xxx-1.4.7-r3.do_patch xxx-1.4.7-r3.do_populate_sysroot.emenlow xxx-1.4.7-r3.do_setscene xxx-1.4.7-r3.do_unpack and after rm_work, we'd have stamps of: xxx-1.4.7-r3.do_package_setscene.emenlow xxx-1.4.7-r3.do_package_write_ipk_setscene xxx-1.4.7-r3.do_package_write_rpm_setscene xxx-1.4.7-r3.do_populate_sysroot_setscene.emenlow We also need to handle stamps in the form xxx-1.4.7-r3.do_package.MACHINE.TASKHASH as used by some signature generators. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rm_work: With the recent pseudo changes, this no longer makes senseRichard Purdie2010-12-211-4/+0
| | | | Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* rm_work: Set BB_SCHEDULER as done in OE.dev to ensure disk space is freed ↵Richard Purdie2010-11-281-0/+4
| | | | | | sooner rather than at the end of the build Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* rm_work.bbclass: Handle case where pseudo directory doesn't existRichard Purdie2010-10-231-1/+3
| | | | Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* rm_work: Fix interaction issues with pseudoRichard Purdie2010-10-121-1/+6
| | | | | | | | | | | This class needs to wipe out the contents of the pseudo database but also ensure the pseudo directory exists for any subsequent tasks and also ensure any pseudo server has shut down before removing the database. This patch does all of these things. [BUGID #222] Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* rm_work.bbclasS: Don't remove the pseudo database as it causes problems with ↵Richard Purdie2010-07-251-1/+1
| | | | | | meta-toolchin Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* rm_work.bbclass: Update for bitbake 1.8.8Richard Purdie2007-09-011-9/+9
| | | | git-svn-id: https://svn.o-hand.com/repos/poky/trunk@2633 311d38ba-8fff-0310-9ca6-ca027cbcb966
* classes: Sync various classes with OE for various bugfixesRichard Purdie2007-08-081-0/+7
| | | | git-svn-id: https://svn.o-hand.com/repos/poky/trunk@2407 311d38ba-8fff-0310-9ca6-ca027cbcb966
* Fix bashismsRoss Burton2007-02-211-1/+1
| | | | git-svn-id: https://svn.o-hand.com/repos/poky/trunk@1281 311d38ba-8fff-0310-9ca6-ca027cbcb966
* classes: Sync with OE - mainly quoting fixes or other minor updatesRichard Purdie2006-11-201-1/+1
| | | | git-svn-id: https://svn.o-hand.com/repos/poky/trunk@885 311d38ba-8fff-0310-9ca6-ca027cbcb966
* Rename /openembedded/ -> /meta/Richard Purdie2006-07-211-0/+22
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@530 311d38ba-8fff-0310-9ca6-ca027cbcb966