summaryrefslogtreecommitdiffstats
path: root/meta/classes/staging.bbclass
Commit message (Collapse)AuthorAgeFilesLines
* staging: Fix overlapping file failuresRichard Purdie2020-05-071-2/+10
| | | | | | | | | | | | | | | | | | | | | If there are different providers of a file and they are swiched when the recipe isn't machine specific, we can get tracebacks due to the overlapping files. The issue is that the previous provider isn't uninstalled since the system can't tell whether some later task needs them. By tracking which tasks we depend upon, the code can now choose to uninstall more things since a later task can reinstall if/as needed. The code here was to protect against code with two different tasks running in parallel which is still protected agaisnt. [YOCTO #13702] (From OE-Core rev: 86f36e3f93cdb2f5882b72e736a770aa6f46100d) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* staging: Handle races between binaries and their libsRichard Purdie2020-02-151-1/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | There is a long standing issue where a binary could be installed into the sysroot before its library dependencies. We've always argued nothing should use the binary until it has been installed by a dependency but there are issues around binaries which conflict with the host system, for example patch, python3, gzip and more. With the recent patch changes we've seen issues like: ERROR: gdb-cross-canadian-powerpc-8.3.1-r0 do_patch: Command Error: 'quilt --quiltrc /home/pokybuild/yocto-worker/qemuppc/build/build/tmp/work/x86_64-nativesdk-pokysdk-linux/gdb-cross-canadian-powerpc/8.3.1-r0/recipe-sysroot-native/etc/quiltrc push' exited with 0 Output: Applying patch 0009-Change-order-of-CFLAGS.patch patch: /lib64/libattr.so.1: version `ATTR_1.3' not found (required by patch) Patch 0009-Change-order-of-CFLAGS.patch does not apply (enforce with -f) which is a symptom of this issue (libattr-native is a dependency of patch-native). There are other ways to fix this such as disabling libattr in patch, installing patch to a subdirectory and requiring PATH manipulation and so on. We can simply fix the staging code to handle /bin/ after everything else so do that and avoid all these other complications. (From OE-Core rev: 29d17fe23265bf0c7defa14ffc0f677af15c6818) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* staging.bbclass: correctly exclude ptest directoriesAlexander Kanavin2020-01-101-1/+1
| | | | | | | | | They were not excluded when multilib variants were being built. (From OE-Core rev: 11d053764338465adbec2d0c31bad0387e36405d) Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* staging.bbclass: Fix wrong library paths in sysroot_stripJunling Zheng2019-11-271-2/+2
| | | | | | | | | | Do not reset libdir and base_libdir in sysroot_strip, and just pass crude paths as they will be reset later in strip_execs. (From OE-Core rev: eab7f448aa537539b45ee21df4ea25de97e60a7e) Signed-off-by: Junling Zheng <zhengjunling@huawei.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* staging: Handle files moving between dependenciesRichard Purdie2019-11-071-1/+15
| | | | | | | | | | | | | | | | | | Currently, if files move between recipes, do_prepare_sysroot can fail with a message like Exception: FileExistsError: [Errno 17] File exists: 'TMPDIR/sysroots-components/core2-64/libx11/usr/include/X11/extensions/XKBgeom.h' -> 'TMPDIR/work/core2-64-poky-linux/gtk+3/3.24.8-r0/recipe-sysroot/usr/include/X11/extensions/XKBgeom.h' This is because files are removed and then added per package. What needs to happen is all removes need to be processed, then all additions. This patch changes the code to process in two phases, removals first, then additions, which avoids the problem. (From OE-Core rev: e3e5ace6e68d5fe68e4add301a44c1a1b8607411) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* Clean up remnants of glibc-initialNathan Rossi2019-09-061-1/+1
| | | | | | | | | Remove remnants of the glibc-initial recipe. (From OE-Core rev: 332b1e21db3e0cbeeb14f12dd6aeedb89b76d761) Signed-off-by: Nathan Rossi <nathan@nathanrossi.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* staging: Drop clean_recipe_sysrootRichard Purdie2019-07-181-11/+0
| | | | | | | | | | | | | With recent changes to runqueue, this fuction is unsafe as setscene tasks can run at the same time as normal ones and doing things before do_fetch no longer offers any guarantees. There is other code which cleans out things from the sysroots as tasks rerun so we should rely upon that instead. (From OE-Core rev: 27ce69861edb7e52078b59ebf8fefc9201e9a228) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* staging: Code cleanupRichard Purdie2019-06-301-7/+0
| | | | | | | | | multiconfig dependencies no longer appear in BB_TASKDEPDATA so we can drop this code. (From OE-Core rev: 288b04c8a31fcf257219a57e23663b74178c75f2) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* useradd: Fix build architecture corruption of sstate artefactsRichard Purdie2019-05-311-1/+1
| | | | | | | | | | | | | | | | | | | | When mixing aarch64 and x86_64 host builds with common sstate, useradd failures were found. This was due to references to: /home/pokybuild/yocto-worker/qemuarm/build/build/tmp/sysroots-components/aarch64/pseudo-native/usr/bin/pseudo or /home/pokybuild/yocto-worker/qemuarm/build/build/tmp/sysroots-components/x86_64/pseudo-native/usr/bin/pseudo on the wrong architecture within the useradd postinst files. Instead of using COMPONENTS_DIR as the FIXME, use PSEUDO_SYSROOT which contains the arch component as well to avoid this. Add extra comments to cause the relavent sstate to be rebuilt. (From OE-Core rev: 0384622f72a6c0bd8225cf06f692340fdef67d4a) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* staging: add ${datadir}/gtk-doc/html to the sysroot blacklistRoss Burton2019-04-301-1/+2
| | | | | | | | | | | | | | | When api-documentation is enabled the GNOME stack builds API documentation. As ${datadir} is in SYSROOT_DIRS this documentation is in the sysroot but is never used, wasting time and space. Add ${datadir}/gtk-doc/html to the blacklist so that the generated documentation isn't in the sysroot. Note that we don't blacklist all of ${datadir}/gtk-doc because gtk-doc itself installs files there which are needed to use gtk-doc. (From OE-Core rev: 11c87952c9a71036119d509ce09f17e352e4c6d8) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* base.bbclass, staging.bbclass: Move prepare_recipe_sysroot task dependencyPeter Kjellerstedt2019-04-031-0/+1
| | | | | | | | | | | | | | | Move prepare_recipe_sysroot's task dependency on populate_sysroot from base.bbclass (where it was specified in the middle of do_configure's definition) to staging.bbclass (where the rest of do_prepare_recipe_sysroot is defined). This was a left-over from when recipe specific sysroots were introduced in commit 809746f5 and the task dependency on populate_sysroot was moved from do_configure to do_prepare_recipe_sysroot. (From OE-Core rev: fe6d020dd609fbde7e4413cef9bbdd4e3962c82c) Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* staging: Fix staging_populate_sysroot_dir native corruptionRichard Purdie2019-02-251-0/+4
| | | | | | | | | | | | | | | | bitbake gdk-pixbuf gdk-pixbuf-native bitbake build-sysroots -c build_target_sysroot can lead to tracebacks as gdk-pixbuf-native is being installed into the target sysroot. The issue is that the x86_64 (common BUILD_ARCH) sysroot components directory can contain a mix of native and target artefacts. Differentiate by the "-native" in the recipe names. Should also trim down the size of the sysroot used in eSDK. (From OE-Core rev: 57f32836060bba0eaa6b36f53146dd6fd07b77ed) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* staging: Fix broken debug codeRichard Purdie2018-09-101-1/+1
| | | | | | | | | The code currently only prints a single depchain due to overwriting data instead of appending. Fix this. (From OE-Core rev: 48af19cdfa92aa9d336da50afe4ed3dde92daecc) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* staging: Ensure we handle glibc-locale do_stash_locale correctlyRichard Purdie2018-09-101-0/+2
| | | | | | | | | | | | | | | | | | | | Occasionally we see warnings like: WARNING: core-image-sato-1.0-r0 do_populate_sdk: Manifest /home/pokybuild/yocto-worker/nightly-qa-extras/build/build/tmp/sstate-control/manifest-allarch-nativesdk-linux-libc-headers.populate_sysroot not found in i686_linux allarch (variant '')? which occur when do_populate_sdk is run in an otherwise empty TMPDIR. It occurs because do_stash_locale is not recognised as a setscene task and is removed from the taskgraph meaning the dependency chains fed through setscene_depvalid don't match what was actually setscene'd. That task is recipe specific and not in the global SSTATETASKS so we hardcode the value for now to stop the build warnings. This is going to need to be revisited for a more generic solution. (From OE-Core rev: d8d5b624058920113f9d297f7f711d6d3249ae39) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* multiconfig: Enable multiconfig dependencies on oe-coreAlejandro Enedino Hernandez Samaniego2018-08-011-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch enables multiconfig dependencies (mcdepends) to be used on recipes using the following format: task[mcdepends] = "multiconfig:FROM-MC:TO-MC:PN:task-to-depend-on" For the sake of simplicity consider the following example: Assuming we have set up multiconfig builds, one for qemux86 and one for qemuarm, named x86 and arm respectively. Adding the following line to an image recipe (core-image-sato): do_image[mcdepends] = "multiconfig:x86:arm:core-image-minimal:do_rootfs" Would state that core-image-sato:do_image from x86 will depend on core-image-minimal:do_rootfs from arm so it can be executed. This patch makes modifications to bitbake.conf to enable mcdepends, and to sstatesig and staging.bbclass to avoid conflicts between packages from different multiconfigs. [YOCTO #10681] (From OE-Core rev: f71bfe833c657244d2fd07b3b71e86081d7d1c04) Signed-off-by: Alejandro Enedino Hernandez Samaniego <alejandr@xilinx.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package: Call file to determine elf status in parallelRichard Purdie2018-07-241-2/+2
| | | | | | | | | | This allows the calls to is_elf (which calls file) to happen in parallel allowing a speedup of do_package and do_populate_sysroot for native recipes. (From OE-Core rev: bbe0d3e26484f3f347262d40a8a9d415ce21fb43) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* staging: Always use the default sysroot for allarch recipesRichard Purdie2018-07-041-0/+3
| | | | | | | | Without this, recipes can't find allarch data files like autoconf-archive. (From OE-Core rev: 8ae70703f68853a8714a4fb8fa5d959b5e21a02d) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* staging: Improve fixup processing codeRichard Purdie2018-07-021-12/+6
| | | | | | | | | | | | | With the fixes to other parts of multilib, it was found that the fixup code's assumptions about the recipe sysroot were incorrect. We need to use the value calculated earlier in the function. It turns out there is a rather neat way to do this which cleans up the code as an added bonus. (From OE-Core rev: 2c1978fe1a5b72167c49010fbdd39a9e2eefdef8) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* staging/image: Fix multilib recipe sysroot issuesRichard Purdie2018-07-021-0/+4
| | | | | | | | | | | | | Currently if you enable multilib, then build an image, the multilib recipe sysroot is build in the wrong WORKDIR. If you then clean and rebuild the image you see "file exists" errors. This patch ensures the real WORKDIR is used consistently and then cleans/rebuilds also work correctly. (From OE-Core rev: c013ae59a158378d06ecf8eb123df0a10bf986b4) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sstatesig/staging/package_manager: Create common sstate manifest codeRichard Purdie2018-03-011-31/+5
| | | | | | | | | Create a common function for locating task manifest files rather than several implementations with missing pieces. (From OE-Core rev: 68150bac7444f089f19c789e9f6602d59f605d7a) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* staging.bbclass: make subprocess.check_output() capture stderrRobert Yang2018-01-061-3/+3
| | | | | | | | | This is very useful for debugging. The similar to testsdk.bbclass. (From OE-Core rev: de30b61b87047f61de4629f8e5bd87598de7fd0c) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* staging.bbclass: handle postinst-useradd-* fixmesMikko Ylinen2017-10-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | After 02457ef7f600ce954874e2d11e74b1c6daaa3bfc, PSEUDO for postinst-useradd-* scripts get to use only one PSEUDO_LOCALSTATEDIR which is set under recipes ${WORKDIR}. When the those scripts are run in a clean build environment that is built from the sstate (populate_sysroot_setscene run for postinst-useradd-* providers), pseudo fails to run because it cannot access the PSEUDO_LOCALSTATEDIR (recipe ${WORKDIR}s do not exist). This triggers a sysroot staging error. Previously, the PSEUDO_LOCALSTATEDIR setting in useradd.bbclass worked because the RSS sstate/staging logic automagically processed ${STAGING_DIR_TARGET} in postinst-useradd-* scripts to point under the sysroot being built. The fix uses the same fixme processing by adding PSEUDO_LOCALSTATEDIR variable to it. Furthermore, LOGFIFO is added to be able to use the logging fifo of the recipe that actually runs postinst-useradd-*. (From OE-Core rev: b28374cfad37db161b5ac5953b4a4638912f3f27) Signed-off-by: Mikko Ylinen <mikko.ylinen@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* meta: drop True option to getVar callsMing Liu2017-09-261-7/+7
| | | | | | | | | Search made with the following regex: getVar ?\((.*), True\). (From OE-Core rev: dbc0eaf478feb3f752ae22fd184984494fc85d0a) Signed-off-by: Ming Liu <liu.ming50@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* staging: Reduce verbosity of log messagesRichard Purdie2017-09-251-2/+10
| | | | | | | | | | | | | The staging changes were very verbose in their logging and whilst this is useful when staging issues occur, those thankfully seem rare now and we can tune down the logging to a sane level. This improves the readability of error messages from functions that fail. The code is still verbose when its replacing things in the sysroot. (From OE-Core rev: a22d44c6bef7ea1be90aeb32ccd7502d3135a266) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* staging: gracefully abort if two recipes conflict in the sysrootRoss Burton2017-09-111-3/+15
| | | | | | | | | | | | | | | | When building the per-recipe sysroot keep track of what files we're installing and where they came from, so we can detect when a file is installed by two different recipes and tell the user what these recipes are (instead of just showing a os.link() stack trace). [ YOCTO #11631 ] (From OE-Core rev: 606a8e0ca218f023e362c3678122d36d537f95de) (From OE-Core rev: 2ebbeb61114e4b847e9164c621ac87b5cf03a299) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* staging: Fix a logic error which caused dependency removalRichard Purdie2017-09-021-5/+6
| | | | | | | | | | | | | There was a logic error in the dependency cleanup code which meant it would remove dependencies which other tasks still depended upon. Fix the path names so the comparisions work as intended. This fixes dependencies accidentally disappearing from sysroots under certain reconfiguration situations. (From OE-Core rev: 1634fe5148b3501f2c1b75cf7fb704a2ef60424e) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* staging: Ensure dependencies are removed before being addedRichard Purdie2017-08-271-38/+39
| | | | | | | | | | | | | | | Currently items are added to the sysroot, the obsolete items are removed. If a change such as pkgconfig -> pkgconf is made, this leads to conflicts of overlapping files in the sysroot. In order to better support this, handle removing items before adding them. This requires some minor refactoring to construct the installed list before the main function loop, otherwise there are no changes in this patch other than reordering the operations. (From OE-Core rev: add4f107c151d32d9ea914bb0b93c3d3c17c776c) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* staging: Avoid sysroot removal racesRichard Purdie2017-08-271-5/+20
| | | | | | | | | | | | | Currently a task could remove a dependency needed by another task leading to build failures, often due to missing dependencies (e.g. dynamic libraries not being found). This was often seen for all-arch recipes in package_write_rpm. When removing a dependency, first check that no other task active for the recipe has that same dependency. (From OE-Core rev: ff3617cc2cd5618f48a25aa4e3b2014430fcbe23) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* staging: add missing import errno to staging_populate_sysroot_dirMarko, Peter2017-08-231-0/+1
| | | | | | | | | | Fixes error "Exception: NameError: name 'errno' is not defined" during build-sysroots.bb:do_build_target_sysroot (From OE-Core rev: b1e482ae20b9c714f4089d4da6470d041242e441) Signed-off-by: Marko, Peter <peter.marko@siemens.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/staging: change fixme debug message from note to debugPaul Eggleton2017-07-211-1/+1
| | | | | | | | | | | | | | These messages were added for debugging during the recipe specific sysroot work. They may still be useful but they don't need to be notes - if they are they show up in recipetool / devtool output when fetching source. (From OE-Core rev: a0e93d5c5dcf59d1898a3db727a5ab2d75e3d20e) (From OE-Core rev: bc1a4af950a2600028d89b7dcb4ff8f409b52739) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* staging: Ensure a clean recipe sysroot removes addto_recipe_sysroot stampsRichard Purdie2017-07-081-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | The commands: bitbake nodejs-native; bitbake nodejs-native -c clean; bitbake nodejs-native; bitbake -c addto_recipe_sysroot nodejs-native; bitbake -c devshell nodejs-native; bitbake -c addto_recipe_sysroot nodejs-native; bitbake -c devshell nodejs-native; never result in npm in the sysroot within devshell. The reason is the addto_recipe_sysroot stamp isn't removed when do_fetch is run but the sysroot is cleaned. With this patch, the second devshell will contain npm, which I think is probably the best outcome we can hope for here. [YOCTO #11461] (From OE-Core rev: c440298674ab3b960c83a127eedb9e1b66bddf78) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* staging.bbclass: Make use of oe.package.strip_execsTobias Hagelborn2017-06-281-95/+13
| | | | | | | | | | | | Make use of the library function oe.package.strip_execs for stripping sysroot executables. oe.packge.strip_execs is based on code previously residing in sysroot_strip. (From OE-Core rev: fc4e6a30c51f8b15b667c21aaa6de9ba45217c1e) Signed-off-by: Tobias Hagelborn <tobiasha@axis.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* staging.bbclass: fix typoChen Qi2017-06-141-1/+1
| | | | | | | | | The function is "sysroot_strip" instead of "split_and_strip_files". (From OE-Core rev: f2d349887710dcae05db09dc2277223e85fa1c19) Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* staging: Allow BB_LIMITEDDEPS to avoid BB_TASKDEPDATARichard Purdie2017-05-121-16/+16
| | | | | | | | | | | | In the limited dependency case we don't use any of the data from BB_TASKDEPDATA. Restructure the code so this variable doesn't have to be set. This allows the function to be called from other contexts without creating artificial constructs. There should be no functional change, behaviour remains unchanged. (From OE-Core rev: 71e5243e3ebadb90b45fe418dac3eaa2c1b896bd) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* useradd.bbclass: Handle COMPONENTS_DIR when restoring statePeter Kjellerstedt2017-05-111-1/+1
| | | | | | | | | | | The export of PSEUDO in useradd_sysroot() contains references to ${COMPONENTS_DIR}. These need to be handled when restoring postinst-useradd-${PN} from the sstate cache. (From OE-Core rev: 097875bc9ab9d60a452b01ac6825775983684d68) Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake.conf: Add COMPONENTS_DIR for ${STAGING_DIR}-componentsPeter Kjellerstedt2017-05-111-3/+3
| | | | | | | | | | The path to where to install and find the sysroot components is used in many places. This warrants it to get its own variable. (From OE-Core rev: 70a84b525470f72339568409daf84845904e4cab) Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sstate.bbclass, staging.bbclass: Handle HOSTTOOLS_DIR when restoring statePeter Kjellerstedt2017-05-011-1/+1
| | | | | | | | | | | Paths to host tools that have been copied to ${HOSTTOOLS_DIR} may end up in the sstate cache. They thus need to be corrected when restoring from the sstate cache. (From OE-Core rev: f8671aecf05a286dd2b34b07bb5fbbe0c31e26d0) Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* staging: Fix sysroot problem with populate_sysroot dependencies on do_fetchRichard Purdie2017-04-111-1/+6
| | | | | | | | | | | | | | | | | Dependencies on svn:// urls were failing as the cleandirs on do_fetch was destroying any sysroot setup by the extend_recipe_sysroot function. Add code so that if the task do_fetch, we move the cleandirs to a separate function before the extend_recipe_sysroot prefunc else we'd wipe out the sysroot we just created. This allows fetcher do_populate_sysroot dependencies to work correctly again. I did try various other approaches and a seperate function with cleandirs was the cleanest way to add this without code duplication or too much complexity. (From OE-Core rev: b32fbfc85b14059f0bfdeeffe2c52f8d3c20f276) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* Revert "staging: Fix sysroot problem with populate_sysroot dependencies on ↵Richard Purdie2017-04-111-5/+0
| | | | | | | | | | do_fetch" There seems to be an issue with the patch, revert for now. This reverts commit cd5e0a32184d98beb8d81e6b5527166d3ca4fb3c. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* staging: Fix sysroot problem with populate_sysroot dependencies on do_fetchRichard Purdie2017-04-101-0/+5
| | | | | | | | | | | | | | Dependencies on svn:// urls were failing as the cleandirs on do_fetch was destroying any sysroot setup by the extend_recipe_sysroot function. Add code so that if the task do_fetch, we move the cleandirs to the extend_recipe_sysroot task else we'd wipe out the sysroot we just created. This allows fetcher do_populate_sysroot dependencies to work correctly again. (From OE-Core rev: cd5e0a32184d98beb8d81e6b5527166d3ca4fb3c) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* staging: Remove uninstalled dependencies from sysrootsRichard Purdie2017-03-241-0/+28
| | | | | | | | | | | | | | | | | Currently, if something is added to a sysroot, its hash remains unchanged, and it continues to be buildable, it doesn't get removed from the sysroot. This patch handles the case where something is removed from DEPENDS or [depends]. It does introduce its own issue where something could get removed even though some other task in parallel may have the same requirement. This case should be extrememly rare and fixing the more common DEPENDS removal is likely the bigger win though. (From OE-Core rev: 06227bc5e533841ab12cde84a6ed6f8b8ddeb5cb) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* staging: Update extend_recipe_sysroot vardepsexclude after code changesRichard Purdie2017-03-241-1/+1
| | | | | | | | Changed were made to the code but not reflected in vardepsexclude, fix this. (From OE-Core rev: e59dc6985e22e7ac30b6afa81d448fbc372f5dab) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* staging: Drop BB_SETSCENE_VERIFY_FUNCTION2Richard Purdie2017-03-241-13/+0
| | | | | | | | | | | | | | | | | The original description for this was: """ Since we clean out do_populate_sysroot if do_configure runs, don't allow do_populate_sysroot_setscene functions if we're going to run do_configure. """ With RSS, we don't need to clean do_populate_sysroot any more. Since we no longer do that, this function also has no purpose any longer and can also be removed. (From OE-Core rev: 637c6d17b4a812379cbab64d340660092e046965) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* staging: Drop do_configure clean prefuncRichard Purdie2017-03-241-8/+0
| | | | | | | | | With recipe specific sysroots its now pointless to do this, may as well save the cpu cycles. (From OE-Core rev: b70c8e91e6c4240e95e8b22bcc36525a5a0703f9) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* staging: Drop BB_SETSCENE_VERIFY_FUNCTION since it was replacedRichard Purdie2017-03-241-15/+0
| | | | | | | | | | BB_SETSCENE_VERIFY_FUNCTION2 replaced BB_SETSCENE_VERIFY_FUNCTION and due to our minimum bitbake requirements there is no point in retaining the older version any more. (From OE-Core rev: f08d6ccda5db9fdc81d53370aea1f599718897da) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* staging: Add missing parameter to debug messageRichard Purdie2017-02-071-1/+1
| | | | | | (From OE-Core rev: 77ac40f8d4a4718b05f3692222a0dc91d90f0ab8) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* staging: Improve file creation resilianceRichard Purdie2017-02-071-39/+49
| | | | | | | | | | | | | If you abort a build mid execution of the staging extend_sysroot function there are currently races and cleanup of that function may fail. This change splits the code into separate phases so that the manifests are manipulated before files are installed, meaning we should be able to reverse actions if builds fail, crash or are interrupted. (From OE-Core rev: fc504b6b8538453d2f058d7cc69be098f52f8091) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* staging: Add shared manifest supportRichard Purdie2017-02-071-0/+23
| | | | | | (From OE-Core rev: 51834006476786f847b3ca60d5ed83a952fc64cb) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* staging: Don't put ptest files into the sysrootRichard Purdie2017-02-071-0/+1
| | | | | | | | | This wastes space/time as the ptest files aren't going to be used in the sysroot so add them to the blacklist. (From OE-Core rev: 61591fe2eea588ff92ff7f81f2ed8844617f5307) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* staging: Reduce the number of mkdirs callsRichard Purdie2017-02-011-10/+17
| | | | | | | | | | | | The number of mkdir calls was showing up high on the profile charts since it was getting called once per file which is excessive. Each call results in one or more syscalls which is bad for performance. Cache which directories we've seen to reduce the calls to a more reasonable number and speed up recipe specific sysroots. (From OE-Core rev: 680fb343be5d0a7f9abbe9c75ca232abe5871663) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>