aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2022-05-08fetch/git : Use cat as pagerRichard Purdie
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. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-05-08cache: correctly handle file names containing colonsRoland Hieber
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. Signed-off-by: Roland Hieber <rhi@pengutronix.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-05-05cookerdata: Change emphasis in error message to be clearer to usersRichard Purdie
Users are misreading this message. Reorder the wording to make the empahsis clearer on the shell environment. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-04-30runqueue: Fix sig file location when using multiconfigRichard Purdie
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] Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-04-27fetch2/ssh.py: decode path back for sshRobert Yang
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 Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-04-27fetch2/osc: Add missing parameterRichard Purdie
This probably means the osc fetcher isn't being used but fix the missing parameter. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-04-21buildinfohelper: Drop unused variablesRichard Purdie
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-04-21runqueue: Drop pointless variable assignmentRichard Purdie
This is set at the start of the loop anyway so it does nothing. Drop the pointless code. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-04-21persist_data: Use a valid exception for missing implementationRichard Purdie
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-04-21ui/knotty: Drop pointless pass statementRichard Purdie
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-04-21siggen: Drop pointless break statementRichard Purdie
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-04-21fetch2/crate: Drop unused importRichard Purdie
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-04-21buildinfohelper: Drop unused functionRichard Purdie
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. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-04-21msg: Drop unused local variableRichard Purdie
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-04-21cooker: Drop unused loopRichard Purdie
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-04-21ui/buildinfohelper: Drop unused importRichard Purdie
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-04-21server/process: Drop unused importRichard Purdie
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-04-21tests/parse: Fix one test overwriting anotherRichard Purdie
Fix an issue where two tests have the same name with one overwriting the other. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-04-21bitbake-diffsigs: Make PEP8 compliantMarius Kriegerowski
This ignores flake8 rules: * E402 module level import not at top of file * E501 line too long Signed-off-by: Marius Kriegerowski <marius.kriegerowski@gmail.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-04-19fetch2/git: Simplify the validation of SHA-1 revisionsPeter Kjellerstedt
Also correct two comments, and move slash_re from _revision_key() to the module top level (together with the new sha1_re). Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-04-19providers: use local variable for packages_dynamic patternMatt Madison
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. Signed-off-by: Matt Madison <matt@madison.systems> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-04-15fetch2/crate: fix logger.debug lineRicardo Salveti
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. Signed-off-by: Ricardo Salveti <ricardo@foundries.io> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-04-14pyinotify.py: Simplify identification of which event has occurredPeter Kjellerstedt
Use bitwise operators to manipulate the received event mask in _ProcessEvent. Also minor clarification & clean up of the related comments. 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>
2022-04-14bitbake-diffsigs: make finding of changed signatures more robustSchmidt, Adriaan
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. 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>
2022-04-14ast: Improve function flags handling for EXPORT_FUNCTIONSRichard Purdie
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] Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-04-14fetch2: Add GIT_SSH_COMMAND to the list of exportsPavel Zhukov
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. Signed-off-by: Pavel Zhukov <pavel.zhukov@huawei.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-04-14fetch2/git: canonicalize ids in generated tarballsOlaf Mandel
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. Signed-off-by: Olaf Mandel <o.mandel@menlosystems.com> CC: Marek Vasut <marex@denx.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-04-14checksum: Allow spaces in URI filenamesRichard Purdie
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. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-04-05knotty.py: Show elapsed time also for tasks with progress barsPeter Kjellerstedt
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. Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-04-04data: Fix accidentally added parameterRichard Purdie
This was only meant to be added for the handle_contains function in a previous commit, fix it. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-04-03pyinotify: Handle potential latent bugRichard Purdie
The kernel inotify code can set more than one of the bits in the mask, fsnotify_change() in linux/fsnotify.h is quite clear that IN_ATTRIB, IN_MODIFY and IN_ACCESS can arrive together. We don't care about two of these from a bitbake perspective but it probably explains why in real world builds, we've seen: pyinotify.ProcessEventError: Unknown mask 0x00000006 This module code assumes only one mask bit can be present. Since we don't care about two of these events, just mask them out for now. The "upstream" code is unmainained since 2015. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-04-03cooker: Reset and rebuild inotify watchesRichard Purdie
The recent inotify changes can cause entire build trees to be monitored which is suboptimal for performance. Rather than trying increasingly convoluted tricks to try and handle add/removed directories, rebuild the inotify watch when we reparse the configuration or metadata. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-04-03server/process: Disable gc around critical sectionRichard Purdie
The python gc can trigger whilst we're holding the event stream lock and when cleaning up objects, they can trigger warnings. This translates into a new event which would then need the lock and we can deadlock. Disable gc whilst we hold that lock to avoid this unfortunate and problematic situation. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-04-03data: Ensure vardepsexclude or BB_BASEHASH_IGNORE_VARS covers contains itemsRichard Purdie
Adding bb.utils.filter('WARN_QA', 'patch-fuzz', d) when WARN_QA is in BB_BASEHASH_IGNORE_VARS or in vardepsexclude should not add a dependency on WARN_QA. Fix it and add some tests. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-04-03parse: Ensure any existing siggen is closed down firstRichard Purdie
We're still seeing issues with unclosed asyncio event loops. At the init site, make sure any existing one is closed first to try and avoid this. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-04-01cooker: Avoid error if siggen wasn't setupRichard Purdie
In some cases we'd never have setup a siggen so don't error in that case. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-04-01cooker: Ensure any existing hashserv connection is closedRichard Purdie
Ensure any exiting hash server connection is terminated before we start a new bitbake session. This avoids errors seen with memory resident bitbake when the asyncio event loop isn't closed correctly. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-04-01cooker: Restore sys.path and sys.modules between parsesRichard Purdie
When memory resident bitbake is active and we re-parse, the old module configuration is present which can lead to strange errors. Reset this when reparsing so the state is consistent. This fixes memory resident bitbake errors. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-04-01cooker: Further fixes to inotify to fix memres bitbake issuesRichard Purdie
The previous fix for inotify wasn't quite correct as we need to modify bbseen before calling add_filewatch(). We also need to ensure the parse mtime cache is cleared when directories are added/removed. There was also a typo in the original fix and the wrong watcher was being changed. Fix the various issues which improves memory resident bitbake testing results. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-03-30bitbake: bitbake-user-manual: punctuation fixesMichael Opdenacker
- Replace hyphens by em dashes when necessary See https://www.grammarly.com/blog/hyphens-and-dashes/ - No uppercase after em dashes - No uppercase after colons if what follows is not a complete sentence. - Fix spacing before colons ":" - Replace em-dashes with colons for consistency in a section (Bitbake rev: 72230d6a9976b3bfca1f1e6fb09736fec195e2fe) Signed-off-by: Michael Opdenacker <michael.opdenacker@bootlin.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-03-30build: Add missing parameter to TaskInvalidRichard Purdie
Fixes: File "bitbake/lib/bb/build.py", line 585, in _exec_task event.fire(TaskInvalid(task, d), d) TypeError: __init__() missing 1 required positional argument: 'metadata' Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-03-30cooker: Rework force parser shutdownRichard Purdie
The "force" option to parser shutdown was often the cause of lockups and there is no good reason we should have two different behaviours. Change and unify the codepaths to always: * Wait for longer for a controlled shutdown of a process (0.5s). Usually it will be much faster if it has finished so the delay doesn't really matter. * Send processes a SIGINT * Failing that, send a SIGTERM * Call .close() if available to release zombies This means we no longer need the "force" parameter to the function so it is removed. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-03-30cooker/process: Fix signal handling lockupsRichard Purdie
If a parser process is terminated while holding a write lock, then it will lead to a deadlock (see https://docs.python.org/3/library/multiprocessing.html#multiprocessing.Process.terminate). With SIGTERM, we don't want to terminate holding the lock. We also don't want a SIGINT to cause a partial write to the event stream. I tried using signal masks to avoid this but it doesn't work, see https://bugs.python.org/issue47139 Instead, add a signal handler and catch the calls around the critical section. We also need a thread lock to ensure other threads in the same process don't handle the signal until all the threads are not in the lock. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-03-30cooker: Simplify parser init function handlingRichard Purdie
Not sure why this is so convoluted but we should simplify it! Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-03-30cooker: Improve exception handling in parsing processRichard Purdie
If an exception occurs in the parsing process, ensure the cleanup is called via all codepaths using a try/finally. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-03-30cooker: Fix main loop starvation when parsingRichard Purdie
When parsing, the parser isn't servicing the main loop so a Ctrl+C in the UI won't be seen on the cooker/server side. Fix this by returning when queue timeouts occur. This helps where there is a hung or slow parsing thread. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-03-30cooker: Fix exception handling in parsersRichard Purdie
We shouldn't be generating exception inside a generator. Rearrange the code to improve the handling of this. Also fix the misconverted code from when multiconfig was added and pass the exception as "result". Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-03-28server/process: Correct a typo in a commentPeter Kjellerstedt
Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-03-26doc: bitbake-user-manual: branch parameter now mandatory in git SRC_URIsMichael Opdenacker
Signed-off-by: Michael Opdenacker <michael.opdenacker@bootlin.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-03-26doc: bitbake-user-manual: add branch parameter to git SRC_URI examplesMichael Opdenacker
This parameter is now required by the git fetcher module Signed-off-by: Michael Opdenacker <michael.opdenacker@bootlin.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>