summaryrefslogtreecommitdiffstats
path: root/meta/lib/oe/sstatesig.py
Commit message (Collapse)AuthorAgeFilesLines
* sstatesig: Account for all dataCaches being passedJoshua Watt2020-06-151-37/+42
| | | | | | | | | | | | Bitbake now passes all the dataCaches to the taskhash API, so use this to correctly filter mcdepends. [YOCTO #13724] (From OE-Core rev: 749731a420fb905b6af97ce2909f06b2bcd14fe2) Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* abi_version/sstatesig: Introduce HASHEQUIV_HASH_VERSIONRichard Purdie2020-02-281-0/+3
| | | | | | | | | | We've found we need a way to cause a change in signatures and move to a new hash 'namespace' with hashequiv. This introduces a variable which allows us to do this. (From OE-Core rev: 1c2d5aeae2fa2dfc16bc60b6cf0b310f826337fd) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sstatesig: Improve debug output if getpwuid() failsRichard Purdie2020-01-161-2/+6
| | | | | | | | | If getpwduid fails, we don't see which file it failed on which is key information to aid debugging. Print this information when exceptions are raised. (From OE-Core rev: 9d7a5219713af8117eda145052c6d9abdf577d8f) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sstatesig: Avoid resetting taskhash within siggen for locked sigsRichard Purdie2020-01-031-1/+5
| | | | | | | | | | | | | Since get_unihash uses taskhash as a key internally, changing it means different bebahour when locked sigs are active verses not active. Under corner cases this leads to a signature mismatch. Avoid this by by adding a wrapper for the place its externally exposed and then not changing the internals. (From OE-Core rev: 23b7484d326cf7fac013384598d7745a042eaa75) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sstatesig: Fix locked signature handling with unihashesRichard Purdie2020-01-031-2/+10
| | | | | | | | | | | | | | | | get_taskhash will call get_unihash internally in the parent class. We need to disable our filter of it whilst this runs else incorrect hashes can be calculated. This is believed to be causing the locked signatures test to fail under some circumstances (depending on whether earlier hashes are being remapped). [YOCTO #13605] (From OE-Core rev: 523c093a882f6831ba75b5c4513837554d7e2414) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sstatesig: Test cross/native hashserv method extensionRichard Purdie2020-01-021-0/+9
| | | | | | | | | | | | | | We can have one taskhash which represents multiple native/cross sstate objects since they're stored by BUILD_ARCH or possibly host distro (or host gcc version). We need to put these into separate namespaces on hashserv since their outhashes will never match and we need deterministic lookups for the different namespaces. Use this extramethod option to handle this. This fixes several problematic failures on the autobuilder. (From OE-Core rev: 2a76082363d189880613765ad339718e3614049d) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sstatesig: Further optimiseRichard Purdie2019-12-161-3/+2
| | | | | | | | Optimise the call into the parent function to be only when needed. (From OE-Core rev: 198bacaa1068fd68075d9182318fe64e9809dd36) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sstatesig: Optimise get_taskhash for hashequivRichard Purdie2019-12-151-2/+11
| | | | | | | | | | | With hashequiv the get_taskhash function is called much more regularly and contains expensive operations. This these don't change based upon hash in a given build, improve the caching within the function to reduce overhead. (From OE-Core rev: de98cfe3cde4b8d5f4b163b5fba3f129651ef06a) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* lib/sstatesig: Fix class inheritance problemsRichard Purdie2019-09-301-7/+8
| | | | | | | | | | | | The locked sigs class needs to be inherited after the hashequiv mixin so that get_unihash can correctly wrap the underlying hashequiv function. To do this turn the locked sigs class into a second mixin, then the order can be correctly handled. Tweak the get/set_taskdata to match. (From OE-Core rev: 73d3414ecf594e426e6024b71931038a201eca52) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sstatesig: Fix hash equivlanency locked signature issuesRichard Purdie2019-09-301-4/+10
| | | | | | | | | | | | | | | | | | | | | | Using locked signatures with the hash equivalency server ran into problems. We need to: a) Ensure the lockedhashes data object is passed from the core to any individual tasks using the get/set_taskdata methods b) Return a locked singature instead of a unihash c) Write the unihash being used to locked signature lists rather than the calculated taskhash d) Skip warnings of hash mismatch if the hash is a unihash These changes fix esdk builds (which use locked sigs) when a hash equivalence server is in use. (From OE-Core rev: 25dc3d78de01dffa77a3a2452d6a97d741b446d9) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* Remove SSTATE_HASHEQUIV_SERVERJoshua Watt2019-09-181-6/+2
| | | | | | | | | | Removes all references to the SSTATE_HASHEQUIV_SERVER variable. This variable is redundant now that BB_HASHSERVE is present. (From OE-Core rev: 54b3adb6bc90a8e4b9e92952688772ee074d36e5) Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sstatesig: Update server URIJoshua Watt2019-09-181-1/+1
| | | | | | | | | | The server no longer uses a "http://" URI, since it has been updated to use a different protocol. (From OE-Core rev: 519561172c48bc7f7a61a3d02edd418fc0895b7b) Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sstatesig: Fix leftover splitting issue from siggen changeRichard Purdie2019-08-121-1/+1
| | | | | | (From OE-Core rev: 8b76048da99ec3be7d763b7ccc81f767c7015bc7) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sstatesig: Updates to match bitbake siggen changesRichard Purdie2019-08-061-32/+22
| | | | | | | | | | | | | Update the metadata to correspond to the bitbake siggen task specification format change. This standardises on "<fn>:<task>" everywhere rather than the "." delimiter that was being used in some places. This is an API breaking change but means we now have a consistent format being used throughout the codebase without compatibility APIs. (From OE-Core rev: 23db236a054ee7a989cdbbcb42ad5c6eefd4a6ae) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sstate/sstatesig: Update to new form of BB_HASHCHECK_FUNCTIONRichard Purdie2019-08-061-6/+7
| | | | | | | | | Bitbake has updated to a cleaned up form of BB_HASHCHECK_FUNCTION, adapt to this cleanup. This is an API breaking change. (From OE-Core rev: a4d413d8d809132b0e0a5dd673a36e2bd0e0be4c) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sstatesig: Update to handle BB_HASHSERVERichard Purdie2019-08-061-2/+6
| | | | | | | | | Update the code to handle BB_HASHSERV, an autostarted bitbake internal hash equivalency server suited to local developer usage. (From OE-Core rev: 9b3d7b0b0ff27281391c2b8f2511d312d6995ed6) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sstatesig: Adpat to recent bitbake hash equiv runqueue changesRichard Purdie2019-08-061-2/+0
| | | | | | | | | | Upstream bitbake now hanes preserving the unihash data itself, drop this usage of persist_data which was extremely problematic due to concurrent task access issues, particulary on loaded systems. (From OE-Core rev: 034d91c2c94b201797a7830b0af6141132f9bad1) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sstatesig: Add debug for incorrect hash server settingsRichard Purdie2019-08-061-0/+4
| | | | | | | | | If the hash server settings are incorrect, show the user useful error messages instead of tracebacks. (From OE-Core rev: 2df5d95b9b63e30ddaa7c72a4173b9a05b3f15f9) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sstatesig: Move unihash siggen code to bitbakeRichard Purdie2019-08-061-162/+1
| | | | | | | | | | | | This code is closely tied with the hash server in bitbake and also means we can't relibably test the hashserv runqueue functionality without OE metadata. Moving this to bitbake as a MixIn class makes most sense and encourages code collaboration and reuse as well as enabling easier and more accurate testing of the APIs. (From OE-Core rev: a2a9c6092d4dde706ed071b08a972d1d87184295) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* multiconfig: Adapt to bitbake switch 'multiconfig' -> 'mc'Richard Purdie2019-06-101-1/+1
| | | | | | (From OE-Core rev: 8a6f7c1e455156966f467008645fef14db679ccf) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* meta/lib+scripts: Convert to SPDX license headersRichard Purdie2019-05-091-0/+3
| | | | | | | | | | | | | | | | | | | | | | | This adds SPDX license headers in place of the wide assortment of things currently in our script headers. We default to GPL-2.0-only except for the oeqa code where it was clearly submitted and marked as MIT on the most part or some scripts which had the "or later" GPL versioning. The patch also drops other obsolete bits of file headers where they were encoountered such as editor modelines, obsolete maintainer information or the phrase "All rights reserved" which is now obsolete and not required in copyright headers (in this case its actually confusing for licensing as all rights were not reserved). More work is needed for OE-Core but this takes care of the bulk of the scripts and meta/lib directories. The top level LICENSE files are tweaked to match the new structure and the SPDX naming. (From OE-Core rev: f8c9c511b5f1b7dbd45b77f345cb6c048ae6763e) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/sstate: Update output hashJoshua Watt2019-01-221-3/+136
| | | | | | | | | | | | | | | | | Updates the output hash calculation for determining if tasks are equivalent. The new algorithm does the following based on feedback: 1) The output hash function was moved to the OE library. 2) All files are printed in a single line tabular format 3) Prints the file type and mode in a user-friendly ls-like format 4) Includes the file owner and group (by name, not ID). These are only included if the task is run under pseudo since that is the only time they can be consistently determined. 5) File size is included for regular files (From OE-Core rev: 4bd297dfe92851f3b44f6b5560bac9d8f9ccf9f2) Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* lib/sstatesig: Update to longer sha256 hash lengthRichard Purdie2019-01-141-1/+1
| | | | | | | | Update the code to match the recent switch to sha256 hashes (From OE-Core rev: 910a8f3e8e350ff5d316faf5e07fb40c6c51f45e) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sstate: Implement hash equivalence sstateJoshua Watt2019-01-081-0/+167
| | | | | | | | | | | | | | | | | | | | | Converts sstate so that it can use a hash equivalence server to determine if a task really needs to be rebuilt, or if it can be restored from a different (equivalent) sstate object. The unique hashes are cached persistently using persist_data. This has a number of advantages: 1) Unique hashes can be cached between invocations of bitbake to prevent needing to contact the server every time (which is slow) 2) The value of each tasks unique hash can easily be synchronized between different threads, which will be useful if bitbake is updated to do on the fly task re-hashing. [YOCTO #13030] (From OE-Core rev: d889acb4f8f06f09cece80fa12661725e6e5f037) Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* multiconfig: Enable multiconfig dependencies on oe-coreAlejandro Enedino Hernandez Samaniego2018-08-011-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* sstatesig: Remove trailing whitespaceJoshua Watt2018-07-061-1/+1
| | | | | | | (From OE-Core rev: 2067172e2e5f90cb321ca124f4f9065ae8ad680f) Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* lib/oe/sstatesig: Fix task mappings from multilib<->non-multilib contextsRichard Purdie2018-07-021-0/+6
| | | | | | | | | | | | | | | | | If we're in a multilib context already and want a non-multilib context this function returned incorrect values. Try and retain optimisations for the common case not needing to request a datastore but allow the different multilib/non-multilib combinations to work too. This fixes bugs where rootfs generation of a multilib image would write into incorrect locations, or be unable to find sstate manifest files due to incorrect data stores being used to expand data. (From OE-Core rev: af7cd7823a8cc95c9f849498b2416cdb0d4d103e) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sstatesig: Move hardcoded native toolsJoshua Watt2018-03-011-5/+0
| | | | | | | | | | Now that SIGGEN_EXCLUDE_SAFE_RECIPE_DEPS supports the wildcard syntax, these exclusions no longer need to be hardcoded (From OE-Core rev: 891ca3c891f2ed5476442442bd9784ba10b9a94d) Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sstatesig: Add recipe wildcardJoshua Watt2018-03-011-0/+4
| | | | | | | | | | The special string "*" on the left hand side of the dependency specification matches all recipes except the one on the right hand side. (From OE-Core rev: 526855f6573317ced913f39e878beac1d5d294de) Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sstatesig: Ignore icecc-create-env in task sigsJoshua Watt2018-03-011-1/+1
| | | | | | | | | | Changes to the icecc-create-env recipe should not cause all recipes to rebuild just because the have inherited icecc. (From OE-Core rev: b088a9c34c34c4bda54d93907e04972d3f8ba5a1) Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sstatesig/staging/package_manager: Create common sstate manifest codeRichard Purdie2018-03-011-0/+35
| | | | | | | | | 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>
* lib/oe/sstatesig: fix wildcard matching wrong task signature filesPaul Eggleton2017-11-051-1/+1
| | | | | | | | | | | | | | | | | | With a '*' as a wildcard for the signature here we can also match a portion of the task name with the result that we may match a sigdata file for the wrong task. Luckily the signature is always the same length - 32 characters - so we can simply use 32 '?' characters instead. (A regex would have been another alternative, but the wildcard should be effective and I felt like a regex would complicate the code more than this solution). Fixes [YOCTO #11763]. (From OE-Core rev: 73c6f85457361cd82d44838946aa81ba9bd1662a) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* lib/oe/sstatesig: exclude ccache-native from signature hashesRoss Burton2017-07-171-1/+1
| | | | | | | | | | | | | | | | Enabling ccache should not cause a complete rebuild, so filter out ccache-native from the dependencies the same way we do for quilt-native (so the world doesn't repatch if quilt changes). This doesn't effect the actual dependencies, just the dependencies that impact the hash. [ YOCTO #11417 ] (From OE-Core rev: ffeca7dcc1abe82cad8374a31bf72b36a472fa1b) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* archiver.bbclass: do not cause kernel rebuildsPatrick Ohly2017-05-181-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | Adding or removing archiver.bbclass from a build configuration causes rebuilds of linux-yocto-based kernels because of the do_kernel_configme->do_unpack_and_patch task dependency. This particular dependency can be ignored for the do_kernel_configme sstate signature calculcation. Idea for the fix from Richard Purdie. Note that building the kernel and adding archiver.bbclass later to archive sources leads to do_unpack_and_patch running after do_kernel_configme (because that already ran in the first build), which might be problematic. This is independent of the change here. The use case in YOCTO #11441 is to removed archiver.bbclass between a production build with archiving enabled and builds via oe-selftests without archiving. That direction is fine. Fixes: YOCTO #11441 (From OE-Core rev: fed0ed82928e6a7846fbad233ac657bd17bcefc7) 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>
* buildhistory-diff: add option to compare task signature listPaul Eggleton2017-04-111-3/+3
| | | | | | | | | | | | Having added writing out of the task signature list to buildhistory (when BUILDHISTORY_FEATURES includes "task"), we now need a way to compare the list. This just shows which tasks have been added / changed signature / removed. (From OE-Core rev: 63bd7e9f780a98dda458d612877495756bcc5463) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/buildhistory: write out task signatures on every buildPaul Eggleton2017-04-111-0/+10
| | | | | | | | | | | | | | | | | If we want to determine what changed since the last build, one angle from which to look at it is to check the signatures. However, if we don't actually have the signatures from the last build we don't have anywhere to start. Save the signatures on each build in order to give us the starting point. NOTE: you need to set your BUILDHISTORY_FEATURES value to include "task" to enable collection of these signatures as it is is disabled by default. (From OE-Core rev: 11f68f65c46c5bc26ddeeade3021e83b3a7f895a) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* lib/oe/sstatesig: avoid reporting duplicate siginfo files from sstatePaul Eggleton2017-04-101-6/+14
| | | | | | | | | | | | | | | | | | | | In find_siginfo(), which is used by bitbake-diffsigs among other things, avoid adding a siginfo file from the sstate-cache where we've already collected a sigdata file from the stamps directory with the same hash. This avoids the possibility that the top two files (as picked by default using the bitbake-diffsigs -t option) are for the same signature and thus the tool would report no differences. In order to do that, just use the hashfiles dict that we already have - we just need to change the code to populate that even if we're collecting matching files without looking for a fixed set of hashes (i.e. taskhashlist isn't set). This replaces previous code in bitbake-diffsigs that attempted to filter these out with limited success. (From OE-Core rev: 5b69eef40868180c59400624096d7ebbbbea446b) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* lib/oe/sstatesig: fix finding native siginfo files in sstate-cachePaul Eggleton2017-04-101-16/+9
| | | | | | | | | | | | | | | | | | When comparing signatures with bitbake-diffsigs -t or bitbake -S printdiff, we use this find_siginfo() function implemented in this module to find the siginfo/sigdata files corresponding to the tasks we're looking for. However, native sstate files go into a NATIVELSBSTRING subdirectory and there was no handling for this when asking about native recipes. I'm not even sure why we were walking SSTATE_DIR in order to find this - we don't need to, we just need to run glob.glob() on the filespec we calculate, which should be a little bit more efficient. (From OE-Core rev: 8cb472e4ed25e56ec0d9cf6d8d101d1ab6687a5b) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* lib/oe.sstatesig: make locked sig file consistentJianxun Zhang2017-01-091-2/+3
| | | | | | | | | | | | Sort keys of dict 'types' prior to dumping, in order to have identical output every time. This could make it a little easier to diff these human-readable dumps. (From OE-Core rev: 8abbaba1931e2cb2b87aa733aa9a3e8eb359b500) Signed-off-by: Jianxun Zhang <jianxun.zhang@linux.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 getVarFlag callsJoshua Lock2016-12-161-1/+1
| | | | | | | | | | | | | | | getVarFlag() now defaults to expanding by default, thus remove the True option from getVarFlag() calls with a regex search and replace. Search made with the following regex: getVarFlag ?\(( ?[^,()]*, ?[^,()]*), True\) (From OE-Core rev: 2dea9e490a98377010b3d4118d054814c317a735) 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>
* meta: remove True option to getVar callsJoshua Lock2016-12-161-15/+15
| | | | | | | | | | | | | 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>
* lib/oe/sstatesig: print locked sigs file message only when explicitly calledPaul Eggleton2016-07-081-6/+4
| | | | | | | | | | | If we're building the extensible SDK we don't need to see the "Writing locked sigs" message; it's only necessary when the user explicitly runs bitbake -S none <target>. (From OE-Core rev: 440a351ee13920045c9d3e51882908f7b3f01d35) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/lib: Update to explictly create lists where neededRichard Purdie2016-06-021-1/+1
| | | | | | | | | Iterators now return views, not lists in python3. Where we need lists, handle this explicitly. (From OE-Core rev: caebd862bac7eed725e0f0321bf50793671b5312) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/lib: Update to match python3 iter requirementsRichard Purdie2016-06-021-1/+1
| | | | | | | | | python3 standardises its use of iteration operations. Update the code to match the for python3 requires. (From OE-Core rev: 2476bdcbef591e951d11d57d53f1315848758571) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sstatesig.py: Add a method to "unlock" recipesRandy Witt2016-04-091-1/+23
| | | | | | | | | | | | | | | | | | | | | | In order to support workflows using devtool where a user might want to modify tasks that exist in locked-sigs.inc, there must be a way to unlock recipes. This patch adds that support by allowing the user to add recipes to SIGGEN_UNLOCKED_RECIPES. Recipes that exist in that variable will have all their tasks unlocked, as well as any tasks that depend on that recipe. For example if foo->bar->baz, if you unlock baz, it will also unlock bar so that foo can be rebuilt without explicitly specifying bar as being unlocked. [YOCTO #9195] (From OE-Core rev: 8a8fc54d824767a6a94d12a4ace98b0bdbb1aa25) Signed-off-by: Randy Witt <randy.e.witt@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sstatesig.py: Improve the SIGGEN_LOCKEDSIGS_TASKSIG_CHECK messageRandy Witt2016-04-091-5/+7
| | | | | | | | | | | | | | | | | | | | The previous message when signatures didn't match between the metadata and the locked signatures file, the message output was a bit confusing. Now the message should be of the form: The zlib-native:do_install sig is computed to be 53531910a2a7848432da89def942a91a, but the sig is locked to d25ba9035f7ccb308e51bbe1066e8d27 in SIGGEN_LOCKEDSIGS_t-x86-64 which will hopefully be more useful in understanding the problem. [YOCTO #9195] (From OE-Core rev: 49eeabfff8bbea69401db41f7219e29acf47af73) Signed-off-by: Randy Witt <randy.e.witt@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sstatesig.py: Split single locked sigs check into multiple checksRandy Witt2016-04-091-6/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | Add the SIGGEN_LOCKEDSIGS_TASKSIG_CHECK and SIGGEN_LOCKEDSIGS_SSTATE_EXISTS_CHECK variables to replace SIGGEN_LOCKEDSIGS_CHECK_LEVEL. SIGGEN_LOCKEDSIGS_TASKSIG_CHECK will no control whether there is a warning or error if a task's hash in the locked signature file doesn't match the computed hash from the current metadata. SIGGEN_LOCKEDSIGS_SSTATE_EXISTS_CHECK will control whther there is a warning or error if a task that supports sstate is in the locked signature file, but no sstate exists for the task. Previously you could only have warning/errors for both controlled by SIGGEN_LOCKEDSIGS_CHECK_LEVEL. This was an issue in the extensible sdk, because we know sstate won't exist for certain items in the reverse dependencies list for tasks. However, we still want to error if task signatures don't match. [YOCTO #9195] (From OE-Core rev: 0fe2a5e5ffd01e926d0f3d4c78ad9910296e2d1a) Signed-off-by: Randy Witt <randy.e.witt@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sstatesig: Ensure we keep native depends for allarch recipesRichard Purdie2016-03-291-1/+1
| | | | | | | | | | | Without this, do_package_write_rpm doesn't depend on rpm-native which it really should since that is needed to build rpms. [YOCTO #8047] (From OE-Core rev: 3fab4f9920d004fe13fb01434d4c7f3b8bbd7895) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* lib/sstatesig: skip shared_workdir when checking locked sigsJoshua Lock2016-03-091-0/+2
| | | | | | | | | | do_shared_workdir is not a proper sstate task, it always reruns if needed, so special-case it in warnings when checking locked sigs. (From OE-Core rev: 4b08f982a2b15bff9092f60f7957301bb2d2108b) Signed-off-by: Joshua Lock <joshua.g.lock@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sstatesig: Handle special case of gcc-source shared-workdir for printdiffRichard Purdie2016-01-111-0/+4
| | | | | | | | | | | | | | | | Often, bitbake -S printdiff would show that there was a checksum not found which would turn out to be from gcc-source. This is due to it being a shared-workdir recipe. For now, hardcode the special case into the sstatesig code to stop people (including me) puzzling over this. If/as/when we add any other shared workdir recipes, we'll need to rethink this. (From OE-Core rev: f11342f0c838b520828927c9d69f7c17309c1b48) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>