summaryrefslogtreecommitdiffstats
path: root/bitbake
Commit message (Collapse)AuthorAgeFilesLines
* bitbake: bitbake-user-manual: npm fetcher: improve description of SRC_URI formatMichael Opdenacker2022-09-161-2/+2
| | | | | | | | | | | | | | | Using the term "Parameter" which is consistent with the description of SRC_URI parameters in the following text. (Bitbake rev: ac576d6fad6bba0cfea931883f25264ea83747ca) Signed-off-by: Michael Opdenacker <michael.opdenacker@bootlin.com> Reported-by: Quentin Schulz <foss@0leil.net> Reviewed-by: Quentin Schulz <foss+yocto@0leil.net> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> (cherry picked from commit 87e42f1202162152c779ccc8bbd06f88f0bdab96) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: bb/utils: movefile: use the logger for printingJose Quaresma2022-09-161-6/+6
| | | | | | | | | | (Bitbake rev: a5fff68c8c83fed52dae0bdcf2c1713566a5a53e) Signed-off-by: Jose Quaresma <jose.quaresma@foundries.io> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> (cherry picked from commit 274b2d7a2fa0b43b0b542cb5471ff832e692ea93) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: bb/utils: remove: check the path again the expand python globJose Quaresma2022-09-161-2/+2
| | | | | | | | | | | | | | | When we call the remove with recurse=True we first check if the remove operation is safe in _check_unsafe_delete_path. But the check is been done on the path instaed of the expanded python glog. (Bitbake rev: 280ea5a776436eab7e664fccea2df2e7ce47e586) Signed-off-by: Jose Quaresma <jose.quaresma@foundries.io> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> (cherry picked from commit 7236488b898309ec5f1880936ddae22a28ccf5d3) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: bitbake: bitbake-user-manual: hashserv can be accessed on a ↵Jose Quaresma2022-09-161-1/+1
| | | | | | | | | | | | dedicated domain (Bitbake rev: b7967aa086ee3f3716a17431af0eef05452fb46f) Signed-off-by: Jose Quaresma <jose.quaresma@foundries.io> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> (cherry picked from commit b171aa45fb8518dcfbba315b303a4fe9bf2180c6) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch2: Ensure directory exists before creating symlinkRichard Purdie2022-09-161-0/+2
| | | | | | | | | | | | | | | If the mirrors code is trying to create a symlink and the parent directory doesn't exist, as might be the case for sstate mirrors where the fetch is into a subdir, it can silently fail. Ensure the directory exists in this case to avoid issues. (Bitbake rev: ff3afb1c1bb236c4a52c62a74f2917071e0af55b) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit eff16e474ee7dc49ae433420a4c8d15d3314a618) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: ConfHandler/BBHandler: Improve comment error messages and add testsRichard Purdie2022-09-163-4/+32
| | | | | | | | | | | | | | | | | | | | | | Currently if you trigger one of the comment errors, the newline characters are stripped and the line numbers are incorrect. In one case it prints the empty line which is also unhelpful. Rework the code around these errors so the line numbers are correct and the lines in question are more clearly displayed complete with newlines so the user can more clearly see the error. I also added a couple of simplistic test cases to ensure that errors are raised by the two known comment format errors. [YOCTO #11904] (Bitbake rev: 01d27562c11d4b05eb30c7f9fefd58b6599fdd15) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 712da71b24445c814d79a206ce26188def8fce0a) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch2: gitsm: fix incorrect handling of git submodule relative urlsGennaro Iorio2022-09-161-1/+1
| | | | | | | | | | | | | | As specified by git submodule manual relative urls can start either with '..' or './', second case was incorrectly managed leading to an interpretation of urls starting with './' as absoulte urls. (Bitbake rev: d828cd2a16ddf4f084e61ffe44471483e132653a) Signed-off-by: Gennaro Iorio <gennaro.iorio@schindler.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 4a0bd3bcd1f7fc25364df8bbf185ff64881c015b) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: doc: bitbake-user-manual: document npm and npmsw fetchersMichael Opdenacker2022-09-161-2/+74
| | | | | | | | | | | | | This addresses bug [YOCTO #10098] (Bitbake rev: 04fdbca2005702e79d69aa56861a085f845178e2) Signed-off-by: Michael Opdenacker <michael.opdenacker@bootlin.com> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit cca7999586317435d79bf53df4359cdd8bfadff4) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: doc: bitbake-user-manual: add explicit target for crates fetcherMichael Opdenacker2022-09-161-0/+2
| | | | | | | | | | | | | Like in other sections describing fetchers (Bitbake rev: bcbe78bbaea0312d61f31f4a51b2bc9e672f1cb7) Signed-off-by: Michael Opdenacker <michael.opdenacker@bootlin.com> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit c9bab35f6aecbf85ee1a19a7b70e15a80b42471f) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: bitbake-user-manual: Correct description of the ??= operatorJacob Kroon2022-09-161-16/+39
| | | | | | | | | | | | | | | Stating that the assignment is done at the end of parsing is misleading. The weak default value is the value which a variable will expand to if no value has been assigned to it using any of the assignment operators. (Bitbake rev: f28dbdf80a7fc2febca227f8cb2b474f5058281e) Signed-off-by: Jacob Kroon <jacob.kroon@gmail.com> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 8189f58d0449d16f162b6e8d98c4e5edc6bff875) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: ConfHandler: Remove lingering closeOla x Nilsson2022-09-161-2/+0
| | | | | | | | | | | | | | | The f.close() statement should have been removed in 459ad524756a3f9b50feeedf31e33502dceae8d5. (Bitbake rev: 23221378ff0d8c6908d75d1be3219aae0beee406) Signed-off-by: Ola x Nilsson <ola.x.nilsson@axis.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 9fc1bab6b7e3c0fca3ddec4bc8c7763d2aff8bab) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: event.py: ignore exceptions from stdout and sterr operations in atexitMikko Rapeli2022-09-161-2/+8
| | | | | | | | | | | | | | | | | | | | When atexit functions run, stdout and stderr operations may fail, e.g. when output is piped to less but has been exited by the user. This removes error print from output of "bitbake -e sqlite3 | less" if user presses "q" before bitbake has finished processing: [Errno 32] Broken pipeError in atexit._run_exitfuncs: Traceback (most recent call last): File "/home/builder/src/poky/bitbake/lib/bb/event.py", line 135, in print_ui_queue sys.stdout.flush() (Bitbake rev: 65cee11967f60c74fa89bb6d72f32135968a6b87) Signed-off-by: Mikko Rapeli <mikko.rapeli@bmw.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 35167536c163eb6b7653cbcaad9f65b834d3e2f8) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: cooker: Drop sre_constants usageRichard Purdie2022-09-161-3/+2
| | | | | | | | | | | | | | | | | | | | As reported by Martin Jansa <Martin.Jansa@gmail.com>: bitbake/lib/bb/cooker.py:16: DeprecationWarning: module 'sre_constants' is deprecated import sre_constants it's deprecated since 3.11 with: https://github.com/python/cpython/issues/91308 The correct replacement for our usage is re.error so use that instead. (Bitbake rev: c98007217b8e40f1abfdcba709185dc5ddbcd0c2) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 3c0cd401472ffee06d5a93bdba566cb033851fcf) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: runqueue: Fix unihash cache mismatch issuesRichard Purdie2022-09-161-0/+3
| | | | | | | | | | | | | | | | | | Very occasionally we see errors in eSDK testing on the autobuilder where the task hashes in the eSDK don't match what was just built. I was able to inspect one of these build directories and noticed that the bb_unihashes.dat file in the eSDK was zero sized. Whilst inspecting the code to understand the cause, I noticed that updated hashes are not saved out in subsequent updates of the values in the rehash process. Add a missing sync call to ensure this happens. (Bitbake rev: 81a6f490dd1f5f669c75cd2ceb1105ce7a09c6e4) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 7912dabbcf444a3c3d971cca4a944a8b931e301b) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: fix kirkstone versionOtavio Salvador2022-09-071-1/+1
| | | | | | | (Bitbake rev: 7d3b766ef26361c44abc2b8175bc5c44e29c3955) Signed-off-by: Otavio Salvador <otavio@ossystems.com.br> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: utils: Pass lock argument in fileslockedJoshua Watt2022-09-021-2/+4
| | | | | | | | | | | | Pass additional arguments in the fileslocked() context manager to the underlying lockfile() function. This allows the context manager to be used for any types of locks (non-blocking, shared, etc.) that the lockfile() function supports. (Bitbake rev: ce9fe70156e8f909a3a81da017b89ea61bc6fe38) Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: runqueue: Change pressure file warning to a noteRichard Purdie2022-08-241-1/+1
| | | | | | | | | The user does need to be told about this but it isn't really a warning, just something they may need to be aware of. Drop the level accordingly. (Bitbake rev: bc85c044ec250001855f2f9f0717ac031feab7c2) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: bitbake: runqueue: add memory pressure regulationAryaman Gupta2022-08-231-5/+22
| | | | | | | | | | | | | | | | | | | | | | | Prevent new tasks from being scheduled if the memory pressure is above a certain threshold, specified through the "BB_MAX_PRESSURE_MEMORY" variable in the conf/local.conf file. This is an extension to the following commit and hence regulates pressure in the same way: 48a6d84de1 bitbake: runqueue: add cpu/io pressure regulation Memory pressure is experienced when time is spent swapping, refaulting pages from the page cache or performing direct reclaim. This is why memory pressure is rarely seen but might be useful as a last resort to prevent OOM errors. (Bitbake rev: 44c395434c7be8dab968630a610c8807f512920c) (Bitbake rev: 4ada86cb6b05e6e3aabc8015a6e73aacb14a3388) Signed-off-by: Aryaman Gupta <aryaman.gupta@windriver.com> Signed-off-by: Randy Macleod <Randy.Macleod@windriver.com> 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>
* bitbake: bitbake: runqueue: add cpu/io pressure regulationAryaman Gupta2022-08-231-0/+65
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Prevent the scheduler from starting new tasks if the current cpu or io pressure is above a certain threshold and there is at least one active task. This threshold can be specified through the "BB_PRESSURE_MAX_{CPU|IO}" variables in conf/local.conf. The threshold represents the difference in "total" pressure from the previous second. The pressure data is discussed in this oe-core commit: 061931520b buildstats.py: enable collection of /proc/pressure data where one can see that the average and "total" values are available. From tests, it was seen that while using the averaged data was somewhat useful, the latency in regulating builds was too high. By taking the difference between the current pressure and the pressure seen in the previous second, better regulation occurs. Using a shorter time period is appealing but due to fluctations in pressure, comparing the current pressure to 1 second ago achieves a reasonable compromise. One can look at the buildstats logs, that usually sample once per second, to decide a sensible threshold. If the thresholds aren't specified, pressure is not monitored and hence there is no impact on build times. Arbitary lower limit of 1.0 results in a fatal error to avoid extremely long builds. If the limits are higher than 1,000,000, then warnings are issued to inform users that the specified limit is very high and unlikely to result in any regulation. The current bitbake scheduling algorithm requires that at least one task be active. This means that if high pressure is seen, then new tasks will not be started and pressure will be checked only for as long as at least one task is active. When there are no active tasks, an additional task will be started and pressure checking resumed. This behaviour means that if an external source is causing the pressure to exceed the threshold, bitbake will continue to make some progress towards the requested target. This violates the intent of limiting pressure but, given the current scheduling algorithm as described above, there seems to be no other option. In the case where only one bitbake build is running, the implications of the scheduler requirement will likely result in pressure being higher than the threshold. More work would be required to ensure that the pressure threshold is never exceeded, for example by adding pressure monitoring to make and ninja. (Bitbake rev: 502e05cbe67fb7a0e804dcc2cc0764a2e05c014f) (Bitbake rev: f4954b878d404a72156fe98609387aa9c5747af0) Signed-off-by: Aryaman Gupta <aryaman.gupta@windriver.com> Signed-off-by: Randy Macleod <randy.macleod@windriver.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> 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>
* bitbake: server/process: Fix logging issues where only the first message was ↵Richard Purdie2022-06-261-2/+5
| | | | | | | | | | | | | | | | | | displayed I realised only the first logging message was being displayed in a given parsing process. The reason turned out to be the UI handler failing with a "pop from empty list". The default handler was then lost and no further messages were processed. Fix this by catching the exception correctly in the connection writer code. (Bitbake rev: b8fd6f5d9959d27176ea016c249cf6d35ac8ba03) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit d3e64f64525187f1409531a0bd99df576e627f7f) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: build: Add clean_stamp API function to allow removal of task stampsRichard Purdie2022-05-251-5/+9
| | | | | | | | | | | | | | | | | | We currently have no API to be able to remove all the potential stamps of a task. It is unusual to need to do this, particularly as you could race against other things happening in the system but we do have a use case for this in cleaning up sysroots in OE-Core. The alternative is to mess with CLEANMASK in OE-Core but that is just going to add potential for errors. We need the first part of the make_stamp() function so separate that out so it can be called seperately. (Bitbake rev: 494fcfcb7c4469915c67f544997104d81c417266) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 4d671504a25863018ac51c21c005cef0a4d8f05c) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: data: Do not depend on vardepvalueexclude flagTomasz Dziendzielski2022-05-251-0/+2
| | | | | | | | | | | | | | | | | If SRC_URI contains python function that extends vardepvalueexclude its value is being tracked by sstate-cache, which can lead to rebuilds if value is set dynamically (for example gerrit replicas). Return empty string if vardepvalueexclude is checked to fix this behaviour. (Bitbake rev: 943701ee8cb55307996545f0237721413edfb168) Signed-off-by: Tomasz Dziendzielski <tomasz.dziendzielski@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit f5f9a7b89a7d8321f03184e61ad6d5ed8d0f840e) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch2/osc: Small fixes for osc fetcherGunjan Gupta2022-05-251-6/+10
| | | | | | | | | | | | | | | | | | | | | | The current fetcher seemed to have some issues that made it difficult when trying to use the same. This patch fixes the following * Make consistent use of the path that needs to be used as oscdir * The path mentioned in os.access in download function was not same as ud.moddir which would result into invoking of fetch command instead of update command even if directory already existed * Before creating oscrc, make sure oscdir exists and create it if it does not exist * Updated the configuration to use apiurl and added a new parameter to control whether http or https needs to be used to connect to apiurl (Bitbake rev: 8ac6e09447d884e658c556388d6014279c50f202) Signed-off-by: Gunjan Gupta <viraniac@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 3ec78686f3c0ea2304097b86a965f9be4b0cb879) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch/git : Use cat as pagerRichard Purdie2022-05-121-1/+1
| | | | | | | | | | | | We don't have less in HOSTTOOLS in OE and this can confuse git. Force the pager to cat to be consistent and minimal everywhere. (Bitbake rev: 59c16ae6c55c607c56efd2287537a1b97ba2bf52) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit d3d406e8552fdd865dc58b419a84411736475ad2) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: cache: correctly handle file names containing colonsRoland Hieber2022-05-121-1/+1
| | | | | | | | | | | | | | | | | | File names containing colons cause split() to return a list with more than two elements, which will lead to a stack trace ending in: ValueError: too many values to unpack (expected 2) Split only once at the last colon, thereby making sure that only two elements are returned. (Bitbake rev: e14ed7dd866334ab40cd335d9c006e5d7b447abd) Signed-off-by: Roland Hieber <rhi@pengutronix.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit a70a7376a8708bde07959deb5d5842d7f84ee5f8) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: runqueue: Fix sig file location when using multiconfigRichard Purdie2022-05-121-1/+1
| | | | | | | | | | | | | | | We're using the wrong data store when trying to locate siginfo files, fix this. Thanks to Gregory Lumen <gregorylumen@microsoft.com> for spotting. [YOCTO #14774] (Bitbake rev: 7eb0ef75fd08b6e4ca1e9dca9c96a7b590e5147b) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 0ed800e19a3197f8e622c8d3b630aae384e60aba) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch2/ssh.py: decode path back for sshRobert Yang2022-05-121-2/+4
| | | | | | | | | | | | | | | | | The path has been encoded by urllib.parse.quote(), so decode it back for ssh. Fixed when fetch from PREMIRRORS via ssh: $ bitbake bonnie++ libsigc++-2.0 -cfetch scp: /path/to/downloads/libsigc%2B%2B-2.10.7.tar.xz: No such file or directory (Bitbake rev: 3969786a787eea34e096b932d52cd02978aacb8e) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit c1c8fc678eb4783cea3974328a5fa8d1b79f1266) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch2/osc: Add missing parameterRichard Purdie2022-05-121-1/+1
| | | | | | | | | | | | This probably means the osc fetcher isn't being used but fix the missing parameter. (Bitbake rev: 73fbb743a2def2037d4053605e77e09d2d8a9fd0) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit a23c201cb6efc5c0abf763c26f905442f0eebb68) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: buildinfohelper: Drop unused variablesRichard Purdie2022-05-121-2/+2
| | | | | | | | | (Bitbake rev: 97e150550a3807c60cfa685abda8dccafc0a1268) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit d720dfa40620e64a557edef527148d58fcb1d858) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: runqueue: Drop pointless variable assignmentRichard Purdie2022-05-121-1/+0
| | | | | | | | | | | | This is set at the start of the loop anyway so it does nothing. Drop the pointless code. (Bitbake rev: dcf78788daa177bf5c438f33b3c9f7ced7aea8ab) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit e6a3173c9cdf349ccbd4cf612868f92cce8717c8) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: persist_data: Use a valid exception for missing implementationRichard Purdie2022-05-121-1/+1
| | | | | | | | | (Bitbake rev: 1e5c5efa6fe9175b27b21cd7a5b833bd3af55238) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 7254eb6b3e8ef504ef2274541dcc55f1d42238c6) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: ui/knotty: Drop pointless pass statementRichard Purdie2022-05-121-1/+0
| | | | | | | | | (Bitbake rev: 00f10fe95393728e94339f3512171ebab96f1900) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 625565087d8c9e7a6a79b0b4f3e5be2d77d5f100) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: siggen: Drop pointless break statementRichard Purdie2022-05-121-1/+0
| | | | | | | | | (Bitbake rev: f9b563dc02535b594975ac0f5dab8e12d11a6ce0) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 42809f6acb79e39042e81d54c28efb92b7481e44) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch2/crate: Drop unused importRichard Purdie2022-05-121-1/+0
| | | | | | | | | (Bitbake rev: 43bb92a2728832eeb1a207809e21404c86ff1710) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 879f17ecd5ba09e217cef74f6a51339b145e8ef5) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: buildinfohelper: Drop unused functionRichard Purdie2022-05-121-21/+0
| | | | | | | | | | | | The function has a loop where the variable is never used which I was going to fix but the entire function never seems to be called so remove it entirely. (Bitbake rev: d739799a1e68dc2ad0414d4ae7d9e079cedcee3c) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 3bcb20f025907f4e88bbe3d14f5638d5f01010cb) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: msg: Drop unused local variableRichard Purdie2022-05-121-1/+0
| | | | | | | | | (Bitbake rev: 609d50a6ccb6f794a3ba6d73a820927eba68891c) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 140929b404ee1e2f5e0e1a3a1d3aa49fb3759ade) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: cooker: Drop unused loopRichard Purdie2022-05-121-13/+12
| | | | | | | | | (Bitbake rev: c6df0e68ef52c10be9e8773e660c3bb5c9d1e915) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 1c811ad6f10560e7a7fb6830cf83707551ba04bd) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: ui/buildinfohelper: Drop unused importRichard Purdie2022-05-121-1/+1
| | | | | | | | | (Bitbake rev: bf221631e4b591c80aadd26c2328586b6a4c9eac) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit aca0ff85109f4b0f3c201c02c3f59cad7ee2e787) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: server/process: Drop unused importRichard Purdie2022-05-121-1/+0
| | | | | | | | | (Bitbake rev: 65413c1cecc7e667b04d73b95de9159c688f7ce3) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 543315e6463f15ca7ab2b4ef3e8ed41bb4207ccf) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: tests/parse: Fix one test overwriting anotherRichard Purdie2022-05-121-1/+1
| | | | | | | | | | | | Fix an issue where two tests have the same name with one overwriting the other. (Bitbake rev: 38842a8150f44f5d31d9bd2b0b6ec0502acc971d) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit da812d938fd79e2cc7bdf355ccf5b0f9ead684c4) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: providers: use local variable for packages_dynamic patternMatt Madison2022-05-121-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | During parsing, Python raises RuntimeError: dictionary changed size during iteration in getRuntimeProviders, if you happen to have a recipe with an explicit RDEPENDS on a dynamic package containing a '+' character, such as 'gtk+3-locale-en'. This is because we're using the modified pattern as the key into the packages_dynamic dict to append to rproviders, and since that key doesn't exist, the dict is getting modified to add a new, empty, entry for it. So even without the runtime error, we'd be generating an incorrect result. Fix this by using a local variable for modifying the pattern and using the original key to retrieve the value on a match. (Bitbake rev: 69d3b86449be23b07f794e302f6e18f3a2c46424) Signed-off-by: Matt Madison <matt@madison.systems> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 07de375c3e57f17ab7b47569186f24ecd9896825) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch2/crate: fix logger.debug lineRicardo Salveti2022-04-151-1/+1
| | | | | | | | | | | | | | | | | logger.debug was giving an integer value (2) as event message, causing knotty to crash when running with debug enabled. bitbake/lib/bb/ui/knotty.py", line 685, in main event.msg = taskinfo['title'] + ': ' + event.msg TypeError: can only concatenate str (not "int") to str Same issue also happens in the original code that was taken from oe-core (openembedded-core/meta/lib/crate.py honister) / meta-rust. (Bitbake rev: c212b0f3b542efa19f15782421196b7f4b64b0b9) Signed-off-by: Ricardo Salveti <ricardo@foundries.io> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: pyinotify.py: Simplify identification of which event has occurredPeter Kjellerstedt2022-04-141-8/+7
| | | | | | | | | | | | | Use bitwise operators to manipulate the received event mask in _ProcessEvent. Also minor clarification & clean up of the related comments. (Bitbake rev: 2ab60c7be124d928d304ab1fb73f0dbff29964ae) Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: bitbake-diffsigs: make finding of changed signatures more robustSchmidt, Adriaan2022-04-141-5/+5
| | | | | | | | | | | | | | | | | In `runtaskhashes`, the keys contain the absolute paths to the recipe. When working with shared sstate caches (where these absolute paths can be different) we see that compare_sigfiles does not identifiy a changed hash of a dependent task as "changed", but instead as "removed"&"added", preventing the function from recursing and continuing the comparison. By calling `clean_basepaths` before comparing the `runtaskhashes` dicts, we avoid this. (Bitbake rev: 7358378b90b68111779e6ae72948e5e7a3de00a9) Signed-off-by: Adriaan Schmidt <adriaan.schmidt@siemens.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: ast: Improve function flags handling for EXPORT_FUNCTIONSRichard Purdie2022-04-141-1/+1
| | | | | | | | | | | | | | | Currently, if you use one of the functions from EXPORT_FUNCTIONS, the meaning of cleandirs and fakeroot are lost. This leads to the function changing in behaviour depending upon it's caller context. This isn't intended so add mapping for the cleandirs and fakeroot flags too. This does break devtool in OE-Core and there is a separate fix for that. [YOCTO #8621] (Bitbake rev: b074f4aff00923acc5bf6649d204d541a79fd2b6) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch2: Add GIT_SSH_COMMAND to the list of exportsPavel Zhukov2022-04-141-0/+1
| | | | | | | | | | GIT_SSH_COMMAND is more convinient to use if arguments have to be passed and the user doesn't want to create a wrapper script around ssh. (Bitbake rev: 5e746cb9d26ce87d6c9d52d9022122081a9811c5) Signed-off-by: Pavel Zhukov <pavel.zhukov@huawei.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch2/git: canonicalize ids in generated tarballsOlaf Mandel2022-04-142-3/+5
| | | | | | | | | | | | | | Change the owner information in the mirror tarballs generated using BB_GENERATE_MIRROR_TARBALLS="1". This is an extension of commit 0178ab83, which used the original pokybuild:user information, but failed to clean up the numerical user and group ids. Now set the more canonical values of oe:oe and 0:0. (Bitbake rev: 37437115d3fb1a9f5d8ed7356a0fc01a408e4f8c) Signed-off-by: Olaf Mandel <o.mandel@menlosystems.com> CC: Marek Vasut <marex@denx.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: checksum: Allow spaces in URI filenamesRichard Purdie2022-04-141-1/+9
| | | | | | | | | | | | | If there are spaces in the URI filenames it can break the code. We already solved this issue once somewhere else in the code so use the same regex trick here as well. We should ultimately refactor this code but at least fix the issue for now. (Bitbake rev: 57e2fc4d7f60afea4d4b2c84761324dd99e74a87) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: knotty.py: Show elapsed time also for tasks with progress barsPeter Kjellerstedt2022-04-051-11/+11
| | | | | | | | | | | While the progress bar is good at conveying information about how much of a task has executed, the elapsed time of the task is still very much relevant to show. (Bitbake rev: 41eeb4f34fb2306303f7688ec5e0ae965a573aa4) Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: data: Fix accidentally added parameterRichard Purdie2022-04-041-1/+1
| | | | | | | | | This was only meant to be added for the handle_contains function in a previous commit, fix it. (Bitbake rev: 7399be398df39bc29e1b5eaac23b29cfae017abd) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>