summaryrefslogtreecommitdiffstats
path: root/bitbake
Commit message (Collapse)AuthorAgeFilesLines
* bitbake: runqueue: Handle deferred task rehashing in multiconfig buildsRichard Purdie2021-05-011-4/+10
| | | | | | | | | | | | If the hash of a task changes and that hash is a deferred task (e.g. a multiconfig build), we need to ensure that the hash change propagates through to all the tasks else the build will run multiple copies of the task, sometimes with oddly differing results as the outhashes of native tasks built in differing locations can confuse things. (Bitbake rev: 2db571324f755edc4981deecbcfdf0aaa5a97627) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: runqueue: Fix multiconfig deferred task sstate validity caching issueRichard Purdie2021-05-011-4/+4
| | | | | | | | | | | | | | | | | | | | | We were testing the validity of deferred tasks setscene status "up front" which is very unlikely to succeed and leads to cache invalidation issues. With the change to rebuild the deferred task list, this status becomes out of sync. The result was tasks being executed when they should not have been leading to extra work for the build unnecessarily. Instead, don't process validity status for deferred tasks and assume their data will become available. If it doesn't, this will now result in a build error as the setscene task will fail and the main task will run instead. In theory we could try and track the state changes in the deferred list and re-test validity then but I'm not sure it is worth the effort when the other code path and errors in setscene tasks will give a pretty good idea of what is happening anyway. (Bitbake rev: edcafac13b3b241b6687419e59018d21811507a1) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: knotty: Re-enable command line logging levelsJoshua Watt2021-05-011-0/+8
| | | | | | | | | | | | The "-l" command line options to enable specific logging domains wasn't working with the switch to structured logging because they were only being used to set the legacy logging domains. Fix this by implementing the logic to parse the user options into the logging configuration. (Bitbake rev: 005fc7a8c588d0b0bca382469645cbf481ad8e30) Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch/s3: Add progress handler for S3 cp commandPrzemyslaw Gorszkowski2021-05-011-1/+40
| | | | | | | | Adds progress support for fetchers from S3. (Bitbake rev: 90d31b2d5a81e5f41fe95907c78fd2f5f36e39ee) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: progress: LineFilterProgressHandler - Handle parsing line which ↵Przemyslaw Gorszkowski2021-05-011-2/+5
| | | | | | | | | | | ends with CR only S3 commands need to handle different CR only line endings, update the handler to cope with this. (Bitbake rev: 3f7b9c1b429a4c68240e80832a8ef93ee210e5ff) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: prserv: Add connect functionPaul Barker2021-04-271-0/+3
| | | | | | | | | | | This function abstracts the setup of a PR service client connection so that openembedded-core doesn't need to be updated any time the details are changed. (Bitbake rev: d892287b31f81b075983ba500be265f75b53df64) Signed-off-by: Paul Barker <pbarker@konsulko.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: prserv: Drop unused dump_db methodPaul Barker2021-04-271-24/+0
| | | | | | | (Bitbake rev: ecb7bf34eac02ff58dbc27b3768ceaf4adb1c9cd) Signed-off-by: Paul Barker <pbarker@konsulko.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: prserv: Drop obsolete python version checkPaul Barker2021-04-271-4/+0
| | | | | | | | | Bitbake no longer supports Python 2 so this version check is obsolete. (Bitbake rev: 45eb6c6e124e507012df9c288f1fbde0e7899e5d) Signed-off-by: Paul Barker <pbarker@konsulko.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: hashserv: Refactor to use asyncrpcPaul Barker2021-04-272-306/+41
| | | | | | | | | | The asyncrpc module can now be used to provide the json & asyncio based RPC system used by hashserv. (Bitbake rev: 5afb9586b0a4a23a05efb0e8ff4a97262631ae4a) Signed-off-by: Paul Barker <pbarker@konsulko.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: asyncrpc: Common implementation of RPC using json & asyncioPaul Barker2021-04-273-0/+394
| | | | | | | | | | | | | | The hashserv module implements a flexible RPC mechanism based on sending json formatted messages over unix or tcp sockets and uses Python's asyncio features to build an efficient message loop on both the client and server side. Much of this implementation is not specific to the hash equivalency service and can be extracted into a new module for easy re-use elsewhere in bitbake. (Bitbake rev: 4105ffd967fa86154ad67366aaf0f898abf78d14) Signed-off-by: Paul Barker <pbarker@konsulko.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: hashserv: Use generic ConnectionErrorPaul Barker2021-04-273-17/+12
| | | | | | | | | | The Python built-in ConnectionError type can be used instead of a custom HashConnectionError type. This will make code refactoring simpler. (Bitbake rev: 8a796c3d6d99cfa8ef7aff0ae55bb0f23bbbeae1) Signed-off-by: Paul Barker <pbarker@konsulko.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: doc: bitbake-user-manual: fix typo left over from Sphinx migrationNicolas Dechesne2021-04-261-2/+2
| | | | | | | | | | Fixes d99760cc687c (sphinx: last manual round of fixes/improvements) Reported-by: Michal Piechowski <m.z.piechowski@gmail.com> (Bitbake rev: 00ce48919de720639eda2b6f7065a82b641e5167) Signed-off-by: Nicolas Dechesne <nicolas.dechesne@linaro.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: doc: bitbake-user-manual: code insertion simplification over two linesMichael Opdenacker2021-04-261-6/+3
| | | | | | | | | | | | | | | This simplifies paragraphs ending with a colon and followed by code insertion. Automatically substituted through the command: sed -i -z "s/:\n\s*::/::/g" file.rst This generates identical HTML output. (Bitbake rev: 51c80fc3497eecc8e50194fe1ff8069b59f03eda) Signed-off-by: Michael Opdenacker <michael.opdenacker@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: doc: bitbake-user-manual: simplify colon usageMichael Opdenacker2021-04-266-193/+193
| | | | | | | | | | - This replaces instances of ": ::" by "::", which generates identical HTML output (Bitbake rev: fd8ce4dcaff3aae395f9945fb0a3be54905e1727) Signed-off-by: Michael Opdenacker <michael.opdenacker@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: layerindex: Add --fetchdir parameter to layerindex-fetchDiego Sueiro2021-04-231-4/+11
| | | | | | | | | | | | Introduce --fetchdir parameter to layerindex-fetch enabling users to choose the directory to fetch the layers different from BBLAYERS_FETCH_DIR. [YOCTO #14347] (Bitbake rev: 784a904faffac723ddf58ba765b9dd11ac068de5) Signed-off-by: Diego Sueiro <diego.sueiro@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: layerindex: Fix bitbake-layers layerindex-show-depends commandDiego Sueiro2021-04-231-0/+1
| | | | | | | | | | | | | | | | | | | | | | | Running 'bitbake-layers layerindex-show-depends meta-filesystems' fails with: ``` Traceback (most recent call last): File "<...>/poky/bitbake/bin/bitbake-layers", line 93, in <module> ret = main() File "<...>/poky/bitbake/bin/bitbake-layers", line 86, in main return args.func(args) File "<...>/poky/bitbake/lib/bblayers/layerindex.py", line 209, in do_layerindex_show_depends self.do_layerindex_fetch(args) File "<...>/poky/bitbake/lib/bblayers/layerindex.py", line 182, in do_layerindex_fetch args.shallow) AttributeError: 'Namespace' object has no attribute 'shallow' ``` Initialize the shallow attribute to fix it. (Bitbake rev: 71f095c147fe6aa7b5e6272002e0498cf9494256) Signed-off-by: Diego Sueiro <diego.sueiro@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: doc/user-manual-fetching: Remove basepath unpack parameter docsRichard Purdie2021-04-201-3/+0
| | | | | | | | | | | | The code for this was removed in 2016 in commit e659a3b0c2771679057ee3e13cd42e6c62383ff2. Nobody seems to have missed it so remove the documentation so we match the code. [YOCTO #13449] (Bitbake rev: 76bf42ea41a28b19d0377c2e548b0a59119fdf67) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch/gitsm: Fix crash when using git LFS and submodulesNiels Avonds2021-04-201-1/+1
| | | | | | | | | | | | | | | | Gitsm fetcher crashes when cloning a repository that contains LFS files. This happens because the unpack method is called during download, but the submodules have not been downloaded yet at this point. This issue was introduced in this commit: 977b7268bf4fd425cb86d4a57500350c9b829162 [YOCTO #14283] (Bitbake rev: 26caedc4d2e9b5a0f1d57f9291754a7f6c5e437e) Signed-off-by: Niels Avonds <niels@codebits.be> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: bitbake-server: Remove now unneeded codeRichard Purdie2021-04-201-2/+0
| | | | | | | | | With the previous patch this code is now pointless as we'd have hit a TypeError before now. (Bitbake rev: 6301a99055c79d89b715f72182cd0ef1b781b89a) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: bitbake-server: ensure server timeout is a floatRoss Burton2021-04-202-2/+2
| | | | | | | | | | | | | | | | | | bitbake-server is spawned by process.py and passes the arguments it is given to ProcessServer. There's some type confusion here: bitbake-server is called with a string representation of the timeout, which may be None. If the timeout is not set, pass 0 instead of None. Inside bitbake-server a ProcessServer is created which expects the timeout to be a float not a string, so always float() the value. [ YOCTO #14350 ] (Bitbake rev: c93ae1f861208f6d39fd15c84fbcd0e2b54331f5) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: tinfoil/data_smart: Allow variable history emit() to function remotelyRichard Purdie2021-04-182-0/+16
| | | | | | | | | | We can't access the emit() function of varhistory currently as the datastore parameter isn't handled correctly, nor is the output stream. Add a custom wrapper for this function which handles the two details correctly. (Bitbake rev: ba0fa084ccd2b1ade96425d158fd31e49e42f286) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: tests/fetch: add tests for local and remote "noshared" git fetchingHenning Schild2021-04-181-0/+38
| | | | | | | (Bitbake rev: e0267fe43bda208856af939b17e39beb9e5586c3) Signed-off-by: Henning Schild <henning.schild@siemens.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: tests/fetch: deduplicate local git testing codeHenning Schild2021-04-181-28/+6
| | | | | | | | | Purely cosmetic change that probably improves the code. (Bitbake rev: 9c0733f0062f3cf19514c891cc06c9a8e0db429b) Signed-off-by: Henning Schild <henning.schild@siemens.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch/git: add support for disabling shared clones on unpackHenning Schild2021-04-181-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | By default the unpacker will create a "shared" clone when cloning from the DL_DIR to the WORKDIR. This patch introduces an option to control that behaviour. Imagine some recipe steps are executed in a namespace that is different from the one your downloader and unpacker ran in. (chroot) Because a "shared" clone has an absolute reference to its "alternate" you now have to make that "alternate" visible in that new namespace (chroot) at the exact place. With this patch you can unpack "noshared" and get a stand-alone copy. This copy will also work if the "alternate" is not visible or existant. The switch is a global bitbake switch and will affect all git urls. Build systems that need "noshared" most likely need it for everything they do with git. (Bitbake rev: 6ae6f1865d5e666ebc670f70b7401a7b41648102) Signed-off-by: Henning Schild <henning.schild@siemens.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: bitbake: tests/fetch: remove write protected files tooMikko Rapeli2021-04-181-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For some reason several git-annex files in Debian 10 buster are read-only and removing them with "rm -rf" fails. Fixes test failures like: $ bitbake-selftest ... rm: cannot remove '/tmp/tmpwmfn4w64/download/git2/tmp.tmpwmfn4w64.gitsource/annex/objects/f87/4d5/SHA256E-s0--e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855/SHA256E-s0--e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855': Permission denied rm: cannot remove '/tmp/tmpwmfn4w64/download/git2/tmp.tmpwmfn4w64.gitsource/annex/objects/f87/4d5/SHA256E-s0--e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855/SHA256E-s0--e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855': Permission denied EE..................................ssss.sssssssssssssss.sssss....................................................................................................... ====================================================================== ERROR: test_shallow_annex (bb.tests.fetch.GitShallowTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/builder/src/base/poky/bitbake/lib/bb/tests/fetch.py", line 1773, in test_shallow_annex fetcher, ud = self.fetch_shallow(uri) File "/home/builder/src/base/poky/bitbake/lib/bb/tests/fetch.py", line 1541, in fetch_shallow bb.utils.remove(ud.clonedir, recurse=True) File "/home/builder/src/base/poky/bitbake/lib/bb/utils.py", line 700, in remove subprocess.check_call(cmd + ['rm', '-rf'] + glob.glob(path)) File "/usr/lib/python3.7/subprocess.py", line 347, in check_call raise CalledProcessError(retcode, cmd) subprocess.CalledProcessError: Command '['rm', '-rf', '/tmp/tmpwmfn4w64/download/git2/tmp.tmpwmfn4w64.gitsource']' returned non-zero exit status 1. Also, one "chmod" call was failing since the .git/annex subdirectory doesn't exist so just chmod the whole temporary directory which should cover any directory name differences between different git-annex versions. Fixes tests failing after chmod call: Running 'export PSEUDO_DISABLED=1; unset _PYTHON_SYSCONFIGDATA_NAME; chmod u+w -R /tmp/tmpwmfn4w64/git//.git/annex' in /tmp/tmpwmfn4w64/git/ (Bitbake rev: 7729ef2983c72867e99fad82d671069ba5cb32b2) Signed-off-by: Mikko Rapeli <mikko.rapeli@bmw.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: bitbake: tests/fetch: fix test execution without .gitconfigMikko Rapeli2021-04-181-1/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A CI user validating changes does not have any git push rights or even a .gitconfig file so fix tests so that they run by setting the user.name and user.email for the repo before committing changes. Fixes errors like: ERROR: test_that_unpack_throws_an_error_when_the_git_clone_nor_shallow_tarball_exist (bb.tests.fetch.GitShallowTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/builder/src/base/poky/bitbake/lib/bb/tests/fetch.py", line 2055, in test_that_unpack_throws_an_error_when_the_git_clone_nor_shallow_tarball_exist self.add_empty_file('a') File "/home/builder/src/base/poky/bitbake/lib/bb/tests/fetch.py", line 1562, in add_empty_file self.git(['commit', '-m', msg, path], cwd) File "/home/builder/src/base/poky/bitbake/lib/bb/tests/fetch.py", line 1553, in git return bb.process.run(cmd, cwd=cwd)[0] File "/home/builder/src/base/poky/bitbake/lib/bb/process.py", line 184, in run raise ExecutionError(cmd, pipe.returncode, stdout, stderr) bb.process.ExecutionError: Execution of 'git commit -m a a' failed with exit code 128: *** Please tell me who you are. Run git config --global user.email "you@example.com" git config --global user.name "Your Name" to set your account's default identity. Omit --global to set the identity only in this repository. (Bitbake rev: 57c0811f1ee19b6619f4840a39e01e3cb98c34c4) Signed-off-by: Mikko Rapeli <mikko.rapeli@bmw.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: runqueue: Fix deferred task issuesRichard Purdie2021-04-181-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | In a multiconfig situation there are circumstances where firstly, tasks are deferred when they shouldn't be, then later, tasks can end up as both covered and not covered. This patch fixes two related issues. Firstly, the stamp validity checking is done up front in the build and not reevaulated. When rebuilding the deferred task list after scenequeue hash change updates, we need therefore need to check if a task was in notcovered *or* covered when deciding to defer it. This avoids strange logs like: NOTE: Running setscene task X of Y (mc:initrfs_guest:/A/alsa-state.bb:do_deploy_source_date_epoch_setscene) NOTE: Deferring mc:initrfs_guest:/A/alsa-state.bb:do_deploy_source_date_epoch after mc:host:/A/alsa-state.bb:do_deploy_source_date_epoch where tasks have run but are then deferred. Since we're recalculating the whole list, we also need to clear it before iterating to rebuild it. By ensuring covered tasks aren't added to the deferred queue, the covered + notcovered issue should also be avoided. in the task deadlock forcing code. [YOCTO #14342] (Bitbake rev: 3c8717fb9ee1114dd80fc1ad22ee6c9e312bdac7) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: bitbake-user-manual: add REQUIRED_VERSION and adjust ↵Paul Eggleton2021-04-151-2/+16
| | | | | | | | | | | | PREFERRED_VERSION entry Add REQUIRED_VERSION, add a reference to it in PREFERRED_VERSION and adjust the opening statement to read slightly better. (Bitbake rev: b32e6c8d4ea2f83fe77021207e9db883fec82d97) Signed-off-by: Paul Eggleton <paul.eggleton@microsoft.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: bitbake-user-manual: document no support for using passwords in git ↵Paul Eggleton2021-04-151-0/+9
| | | | | | | | | | | | URLs This is based on the comment added in revision aded964eed4ce5a725ed1ab477efabc86b1aa481. (Bitbake rev: 082683da089115d8b6f71f221cabb41ac401f733) Signed-off-by: Paul Eggleton <paul.eggleton@microsoft.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: bitbake: Update version to 1.50.0 stable release seriesRichard Purdie2021-04-092-2/+2
| | | | | | (Bitbake rev: e70b925ba98fd4fedf3940d141a4210c953087ca) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: runqueue: Further fixes for confused setscene tasksRichard Purdie2021-04-061-13/+26
| | | | | | | | | | | | | | | There is further evidence of tasks ending up being "covered" and "notcovered" which shouldn't happen and is bad. The code that caused this problem last time appears to have issues where stamps for tasks already exist. Split out the setscene stamp checking code to a separate function and use this when checking "hard dependencies" (like pseudo-native) so that if the stamps exist and it will be "covered", it is not put on the notcovered list. (Bitbake rev: a1848a481e36b729c8e4130c394b1d462d4b488a) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: doc: Update links to documentationMichael Opdenacker2021-03-232-2/+2
| | | | | | | (Bitbake rev: ed8e1fd4cf9d5ac8a8203638add99d686b4b3521) Signed-off-by: Michael Opdenacker <michael.opdenacker@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: runqueue/event: Add an event for notifying of stale setscene tasksRichard Purdie2021-03-232-0/+25
| | | | | | | | | | | Use the new functionality in build.py to identify stale setscene tasks and send an event to the metadata listing them. The metadata then has the option of performing cleanup operations if it thinks that appropriate. (Bitbake rev: ef8c980a3ae92c168b7ca16a4d19cd38a9574761) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: build: Add find_stale_stamps functionRichard Purdie2021-03-231-0/+17
| | | | | | | | | | Add a new function which compares the stamp filename we want (including taskhash) with what is in the stamp directory (using the clean mask). This tells us which stamp files are stale and are due to be rerun. (Bitbake rev: b126a53882d202e4df0f9661303355c9fe9ec80e) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: doc: fix syntax error in layer.conf exampleRobert P. J. Day2021-03-221-1/+2
| | | | | | | | | | | While this example really needs to be rewritten to not define multiple patterns in the same layer.conf, as long as it's there, it might as well be syntactically correct. (Bitbake rev: 1c2d2875099a3ff9149710d42c679ab31b00f68b) Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: doc: fix glossary link for BB_INVALIDCONF variableRobert P. J. Day2021-03-221-1/+1
| | | | | | | (Bitbake rev: 4a4d55c41806815c32add32863a05351a6df30f7) Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: doc: mention that addtask handles multiple dependenciesRobert P. J. Day2021-03-221-0/+11
| | | | | | | | | | Add a note explaining that "addtask" can accept multiple dependencies, just in case someone runs across such an example and is confused. (Bitbake rev: 5e4e9acd323b5ebc3a14c07384f6cf8f8a272066) Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: doc: move BBFILES_DYNAMIC for alphabetical orderRobert P. J. Day2021-03-151-39/+39
| | | | | | | | | | Since BBFILES_DYNAMIC does not have a "BB_" prefix, it belongs further down in the variable glossary. (Bitbake rev: 493f291601c7680f8b8146f358c545fcb5f53cc9) Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: codeparser: Fix TypeError in bitbake debug modeTomasz Dziendzielski2021-03-151-3/+3
| | | | | | | | | | | | | | | | | Commit 75f87db413 fixed the confusion between bitbake and python logger but in codeparser still old method of setting debug level was used causing TypeError, because debug level value was incorrectly returned and assigned to event.msg. | File "./bitbake/lib/bb/ui/knotty.py", line 660, in main | event.msg = event.fn + ': ' + event.msg | TypeError: can only concatenate str (not "int") to str [YOCTO #14298] (Bitbake rev: bec9ea7ab28a8dfad1a6010ca5c6ec691754748d) Signed-off-by: Tomasz Dziendzielski <tomasz.dziendzielski@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: bblayers/query: Update to handle REQUIRED_VERSIONRichard Purdie2021-03-151-1/+1
| | | | | | | | | | | Ii is unclear whether any changes are needed to bblayers are needed to handle the extra data from REQUIRED_VERSION. Update to at match the new API, at present it doesn't look necessary to handle the required version data. (Bitbake rev: 53c30efec4099035d19e6717059dfceff8ff88fd) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: bitbake: cooker: Add REQUIRED_VERSION checksCharlie Davies2021-03-151-2/+8
| | | | | | | | | | | | | Add logic to check that if REQUIRED_VERSION has been set that the cooker class method findBestProviders properly handles the case where the REQUIRED_VERSION has not been found. Fixes [YOCTO #10096] (Bitbake rev: 5df201d746f26154213e6d15d2721cd35b38b59e) Signed-off-by: Charlie Davies <charles.davies@whitetree.xyz> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: bitbake: lib: add Required Version to Bitbake --show-versions commandCharlie Davies2021-03-152-14/+24
| | | | | | | | | | | | | This commit adds a new column to the Bitbake --show-versions command called Required Version. This column will display any packages which have a REQUIRED_VERSION successfully set. Fixes [YOCTO #10096] (Bitbake rev: 90c7d1815e41243323d32b9dbb865757a922578a) Signed-off-by: Charlie Davies <charles.davies@whitetree.xyz> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: bitbake: providers: check for REQUIRED_VERSION in _filterProvidersCharlie Davies2021-03-151-2/+5
| | | | | | | | | | | | | | | | | | Before the REQUIRED_VERSION variable was introduced the PREFERRED_VERSION variable allowed for a fallback to the next most suitable version. Since REQUIRED_VERSION does not allow a fallback to a different version implement a check in the _filterProviders function to make sure that if a requested REQUIRED_VERSION is not found then the function returns no eligible providers have been found. Fixes [YOCTO #10096] (Bitbake rev: c41386b78aa53e0bf081cd973c950b88126670a7) Signed-off-by: Charlie Davies <charles.davies@whitetree.xyz> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: bitbake: providers: introduce logic for REQUIRED_VERSION variableCharlie Davies2021-03-151-15/+41
| | | | | | | | | | | | | | | | | | This commit adds checks during the findPreferredProvider function for a new variable REQUIRED_VERSION. This can be set, in exactly the same manner as PREFERRED_VERSION, on a per package basis to enforce the use of a particular version of a package. REQUIRED_VERSION is similar in behaviour to PREFERRED_VERSION except if the version specified by REQUIRED_VERSION is not found an error occurs and the execution of Bitbake stops. Fixes [YOCTO #10096] (Bitbake rev: 5cbf6d95fc1009e78e7d0745a49e0bf418b37abb) Signed-off-by: Charlie Davies <charles.davies@whitetree.xyz> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: bitbake: providers: consistent single line formatting between functionsCharlie Davies2021-03-151-6/+0
| | | | | | | (Bitbake rev: e8c74ac8e589ee44d862b71fd63dd75ab303d3b5) Signed-off-by: Charlie Davies <charles.davies@whitetree.xyz> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: bitbake: providers: remove unneeded logging callCharlie Davies2021-03-151-1/+0
| | | | | | | | | | | | The logging line for when no eligible providers are found only adds unnecessary noise and is not required. As the stack unwinds better logging occurs which satisfactorily describes the no eligible providers error condition. (Bitbake rev: 933c9df919f7947f515d843199cce2621cf8195f) Signed-off-by: Charlie Davies <charles.davies@whitetree.xyz> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: tests/color: Fix event register to pass the datastoreRichard Purdie2021-03-121-1/+1
| | | | | | | | | | | | | | Adding the "if d is None" to the event handling code meant some of these tests stopped working. The reason is that len(d) was zero but not equal to None. Passing the data object to the register() function in the test correctly registers the event handler and avoids the problem, it just happened to work previously, incorrectly. (Bitbake rev: 426eb83c6668d82a2ebaca6c672db131e37c11da) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: event: Fix another 'if d' test to test for None explictlyRichard Purdie2021-03-111-1/+1
| | | | | | | | This should have been fixed in the previous patch, well spotted Chris! (Bitbake rev: c3f6fee42bfa23f23f167cb29f0cfa05ac2fa197) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: event: Fix multiconfig event handler change performance regressionsRichard Purdie2021-03-111-11/+11
| | | | | | | | | | | | | | There were two issues in this code, firstly the code could stack duplicates in the variable, secondly, calling "if data" caused the datastore to compute len(data) which is comparitively expensive. Checking "if data is not None" is much much faster/cheaper. The issue was clear from "bitbake -p -P" output where the time in register() showed large amounts of time in the __len__ function of the datastore. (Bitbake rev: 9298d08b7dcf9d79f54536f87686d65c4ad7deb9) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: tinfoil: Honor quiet when parsing recipesManuel Leonhardt2021-03-111-1/+1
| | | | | | | | | | | When using parse_recipes, honor quiet so that scripts and custom plugins for recipetool are able to mute progress bars from bitbake that would otherwise print to STDOUT. (Bitbake rev: ab9d26c4847a062cadaae5fb8caac0ead5f958db) Signed-off-by: Manuel Leonhardt <mleonhardt@arri.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>