summaryrefslogtreecommitdiffstats
path: root/bitbake
Commit message (Collapse)AuthorAgeFilesLines
* bitbake: data_smart: Ensure module dependency changes invalidate the base ↵Richard Purdie2025-03-131-0/+5
| | | | | | | | | | | | | | | | | config cache Changing module files was changing the tash hashes but it was not invalidating the parse cache, leading to tashhash mismatch errors during builds. Add information from modulecode_deps to the configuration hash used for cache invalidation to avoid this and trigger reparses when function library code changes. [YOCTO #15795] (Bitbake rev: a121db3d8d28420c36369237b8bb11c2d0aaf5f7) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: hashserv: Add `gc-mark-stream` command for batch hash markingAlexandre Marques2025-03-134-0/+124
| | | | | | | | | | | | | | | | | | | | | | | | Implements the `gc-mark-stream` command to allow for marking equivalence entries in batch, by making use of stream mode communication to the server. The aim of this is to improve efficiency by reducing the impact of latency when marking a high volume of hash entries. Example usage of the new `gc-mark-stream` command: ``` $ cat << HASHES | \ ./bin/bitbake-hashclient --address "ws://localhost:8688/ws" gc-mark-stream "alive" unihash f37918cc02eb5a520b1aff86faacbc0a38124646 unihash af36b199320e611fbb16f1f277d3ee1d619ca58b taskhash a1117c1f5a7c9ab2f5a39cc6fe5e6152169d09c0 method oe.sstatesig.OEOuthashBasic HASHES ``` (Bitbake rev: c84715f28cd36666ea07a179d91b8c32ea0df8e7) Signed-off-by: Alexander Marques <c137.marques@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: bitbake-server/worker: Hide os.fork() deprecation warningRichard Purdie2025-03-112-0/+2
| | | | | | | | | | | | We're fairly careful in bitbake about how we handle fork() calls and believe our code to be safe. The upstream deprecation warning is problematic as it can appear in log output as a WARNING, breaking tests. It also tends to alarm users. Hide the warning for now to avoids the test failures. (Bitbake rev: c636bd629896f56e5f3d4030da3d1f130590afc6) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: doc: bitbake-user-manual-metadata: document the include_all directiveAntonin Godard2025-03-111-0/+27
| | | | | | | | | | Document the include_all directive, which can be used to include multiple files present in the same location in different layers. (Bitbake rev: bd41f09c7fa67f917246a740fd4068e4588a1dcd) Signed-off-by: Antonin Godard <antonin.godard@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: command: Fix command complete event orderingRichard Purdie2025-03-111-2/+2
| | | | | | | | | | | | The command complete event triggers the UI to start new commands. We should send this once we've cleaned up existing commands since on very slow systems, this could otherwise cause failures. There is a 30s timeout on incomming commands but slow systems have been known to hit this on poorly configured I setups. (Bitbake rev: d202298b3d989c39bc532b69c410e2e78b082a11) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: cooker: Add debug for parsing being completeRichard Purdie2025-03-111-0/+1
| | | | | | | | | | We have a "parsing started" event in the cooker deamon log but we don't currently log the corresponding "parsing complete" event which is confusing. Add this so that the logs are more logical. (Bitbake rev: 1aa491c1f1211bf9faab712c321b66629fb7be66) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: doc: bitbake-user-manual-ref-variables: document BB_USE_HOME_NPMRCEric Meyers2025-03-091-0/+6
| | | | | | | | | (Bitbake rev: d5562e007c7c64e8613a118ab9a6c73ed2063263) Signed-off-by: Eric Meyers <eric.meyers@arthrex.com> Cc: Geoff Parker <geoffrey.parker@arthrex.com> Cc: Chuck Wolber <chuckwolber@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch2/npm: Adding npmrc support for private registry authenticationEric Meyers2025-03-091-0/+15
| | | | | | | | | (Bitbake rev: 5fa6137b6d98544766f3152b874e67d04fafb88f) Signed-off-by: Eric Meyers <eric.meyers@arthrex.com> Cc: Geoff Parker <geoffrey.parker@arthrex.com> Cc: Chuck Wolber <chuckwolber@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: codeparser: Skipping typing when inspecting Python modulesPedro Ferreira2025-03-091-2/+10
| | | | | | | | | | | | If a custom python module is added thru BBIMPORTS and it uses typing(Any,Tuple,Union...), codeparser will fail because inspect.py raises TypeError exception if the object is a built-in module, class, or function. (Bitbake rev: 0ecfd0b8540220633e71d24cd73cc5306863ae3c) Signed-off-by: Pedro Silva Ferreira <Pedro.Silva.Ferreira@criticaltechworks.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: tests/fetch: Verify regular expression "URLs" that contain a ?Peter Kjellerstedt2025-03-071-3/+6
| | | | | | | | | | | | A regular expression "URL" in PREMIRRORS and MIRRORS may contain a ? as part of the regular expression. Make sure this does not cause problems. (Bitbake rev: 5af7fe4473cd7e75d4eb7f8b93c499bd157ff156) Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Stefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch2: Partial revert decodeurl() to not use the URI classStefan Herbrechtsmeier2025-03-071-3/+51
| | | | | | | | | | | | | | | | | | | | | | | | This partial reverts commit a5d569c94700f04b8193c6bccae5af619931b00f which changes decodeurl() to use the URI class to parse the URL instead of doing it itself. While reusing code is generally a good idea, using urllib.parse.urlparse() (which the URI class does) to parse the regular expression "URLs" that are used in PREMIRRORS and MIRRORS does not work. A regular expression URL containing https?://... would be silently ignored, while a URL using a negative lookahead such as git://(?!internal\.git\.server).*/.* would result in a cryptic error: Exception: re.error: missing ), unterminated subpattern at position 0 The problem is that urllib.parse.urlparse() treats the ? as the start of URL parameters and thus stops parsing whatever part of the URL it was parsing. Restore the old function and use it in the PREMIRRORS and MIRRORS code. (Bitbake rev: f8a7712754e6d0199a0d227fca288307b935368d) Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Stefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: data_smart.py: clear expand_cache in _setvar_update_overridevarsChen Qi2025-03-061-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | At the end of this function, self.overrides is cleared, which means we'll construct a new self.overrides after this call. And a new self.overrides will give out different expand_cache, so the old expand_cache should also be cleared to avoid any wrong value. Currently, there's a problem revealed by recent recipe specific virtual provider patch. If we enable multilib and set "OVERRIDES:prepend" in local.conf, things don't work. Here's the error message: ERROR: Nothing PROVIDES 'lib32-gcc-cross-x86_64' Below are reproduce steps: 1. Add in local.conf the following lines: MACHINE ?= "qemux86-64" require conf/multilib.conf MULTILIBS ?= "multilib:lib32" DEFAULTTUNE:virtclass-multilib-lib32 ?= "core2-32" OVERRIDES:prepend = "some-override:" (Note that using :append and :remove also reproduces the issue.) 2. bitbake -n lib32-sysstat (bitbake -n core-image-minimal also reproduces the issue) The expandWithRefs calls getVar, which fills expand_cache. So when setting OVERRIDES:prepend, this will fill the expand_cache. When overridevars are updated, if we don't clear expand_cache, we'll retrieve wrong values. Previously, things happened to work because there's a call to expand PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}gcc, which in turn expands TARGET_VENDOR. Now what we expand is PREFERRED_PROVIDER_ virtual/cross-cc, so the problem is revealed. (Bitbake rev: 842e94234c9b9faf4e902721f516071f643e49c9) Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: data_smart.py: simple clean upChen Qi2025-03-061-3/+1
| | | | | | | | | | | | When var matches __setvar_regexp__, which has the value as below, __setvar_regexp__ = re.compile(r'(?P<base>.*?)(?P<keyword>:append|:prepend|:remove)(:(?P<add>[^A-Z]*))?$') the keyword will not be __doc__ or __module__ and var will always contain ":". (Bitbake rev: 0af396917fe176df7b1ed0bd7c7267507ed12e03) Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: data_smart.py: remove unnecessary ? from __expand_var_regexp__Chen Qi2025-03-061-1/+1
| | | | | | | | | | The non-greedy modifier suffix ? is not necessary here because } is not in the character set [a-zA-Z0-9\-_+./~:]. (Bitbake rev: 80735719d0002c02b704a49604ddd82c461203a2) Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: lib/bb/cooker.py: produce an error when BB_HASHSERVE_UPSTREAM ↵Alexander Kanavin2025-03-061-2/+8
| | | | | | | | | | | | | | | | cannot be used due to missing python module Previously if the websockets module was not installed bitbake would only print a warning and continue, resulting in a degraded user experience due to inability to use the configured sstate server. Let's consider that as fatal misconfiguration, so that users can address the issue properly and not wonder why builds are taking forever. (Bitbake rev: cfba2a9fca9dfa3b05ec9040fe0cb8143ac04af7) Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: tests/fetch: Add an additional test case to check whether the fast ↵Stefan Koch2025-03-061-0/+12
| | | | | | | | | fetch is shallow (Bitbake rev: 16f1961e077c525ccfc12496a3deca944df89fc6) Signed-off-by: Stefan Koch <stefan-koch@siemens.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: tests/fetch: Adapt test cases for fast shallow fetchesStefan Koch2025-03-061-19/+12
| | | | | | | | | | | | - Address the absence of an initial full bare clone - Utilize the initial shallow clone - Modify existing test cases for this behavior - Remove incompatible test cases (Bitbake rev: 599fedacd7782dcb52825c22200f35344c102548) Signed-off-by: Stefan Koch <stefan-koch@siemens.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch2/gitsm: Unpack even when `ud.clonedir` is not availableStefan Koch2025-03-061-1/+4
| | | | | | | (Bitbake rev: 13d76361ec37faecd84e7b81da22ada7d4e0ba90) Signed-off-by: Stefan Koch <stefan-koch@siemens.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: bitbake-user-manual: Update documentation for fast `BB_GIT_SHALLOW`Stefan Koch2025-03-061-5/+20
| | | | | | | (Bitbake rev: b92c95fab631156e8c7ecc4ab18e4b16f7e590dc) Signed-off-by: Stefan Koch <stefan-koch@siemens.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch2/git: Add support for fast initial shallow fetchStefan Koch2025-03-061-29/+85
| | | | | | | | | | | | | | | | | | | | | | | | When `ud.shallow == 1`: - Prefer an initial shallow clone over an initial full bare clone, while still utilizing any already existing full bare clones. - If the Git error "Server does not allow request for unadvertised object" occurs, the initial full bare clone is fetched automatically. This may happen if the Git server does not allow the request or if the Git client has issues with this functionality, especially with the Git client from Ubuntu 20.04. This improves: - Resolve timeout issues during initial clones on slow internet connections by reducing the amount of data transferred. - Eliminate the need to use an HTTPS tarball `SRC_URI` to reduce data transfer. - Allow SSH-based authentication (e.g. cert and agent-based) when using non-public repos, so additional HTTPS tokens may not be required. (Bitbake rev: 457288b2fda86fd00cdcaefac616129b0029e1f9) Signed-off-by: Stefan Koch <stefan-koch@siemens.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster/tests: Fix kirkstone testRichard Purdie2025-03-051-2/+2
| | | | | | | | After the fixture changes, the tests need to be tweaked unfotunately. (Bitbake rev: 708abd1a8060684127acc7ce4142f05865005750) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster/fixtures: Add walnascar release informationRichard Purdie2025-03-053-28/+90
| | | | | | (Bitbake rev: 44f732ae1b2d812577a9004f8e15c4ebcdfd1d74) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: Add script to compare toaster fixtures to project release dataRichard Purdie2025-03-051-0/+38
| | | | | | | | | | | | We need to validate the toaster fixtures information against our current release data to ensure it is correct when we release. Add a script we can use to do this which the autobuilder can run to validate things. [YOCTO #15516] (Bitbake rev: 5b2d79ed505bbfa2fb2d355935e75199b7f2c37e) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: contrib: vim: ftdetect: don't conflict with other filetypesRoland Hieber2025-03-031-3/+11
| | | | | | | | | | | | | | | | | | | | | | Use :setfiletype instead of :set filetype. The former only sets the 'filetype' option if it has not been set before, which makes it possible to override the syntax of certain *.inc files in autocommands from e.g. .vimrc or modelines. All other ftdetect plugins in upstream vim also use :setfiletype for this reason. The detection for bitbake *.inc files is now upstream since Vim 9.0 patch 0055 [1]. If we're running an earlier Vim, use the detection heuristic from upstream [2] to overwrite the filetype explicitely if we find bitbake code. But don't always assuming that *.inc files are bitbake files so as not to break Perl, PHP, Assembly, Povray, etc. [1]: https://github.com/vim/vim/commit/fa49eb482729 [2]: https://github.com/vim/vim/blob/fb49e3cde79d/runtime/autoload/dist/ft.vim#L715 (Bitbake rev: e8efbba5d7bb4b685ed0a9b970e042ad99be8afb) Signed-off-by: Roland Hieber <rhi@pengutronix.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: bitbake: runqueue: Verify mcdepends are validMark Hatle2025-03-034-1/+14
| | | | | | | | | | | | | | | In order to avoid a potentially confusing backtrace, check that the mcdepend is valid when we add it. Add a test case to ensure invalid configurations are caught and trigger an error. [RP: Reworked test case to simplify and improve code] (Bitbake rev: ff523497270f37b484b44a4445c2194791bcb6ff) Signed-off-by: Mark Hatle <mark.hatle@amd.com> Signed-off-by: Mark Hatle <mark.hatle@kernel.crashing.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: event/utils: Avoid deadlock from lock_timeout() and recursive eventsRichard Purdie2025-03-032-1/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We've been seeing intermittent failures on Ubuntu 22.04 in oe-selftest which were problematic to debug. The failure was inside lock_timeout and once that was identified and the backtrace obtained, the problem becomes clearer: File "X/bitbake/lib/bb/server/process.py", line 466, in idle_thread_internal retval = function(self, data, False) File "X/bitbake/lib/bb/command.py", line 123, in runAsyncCommand self.cooker.updateCache() File "X/bitbake/lib/bb/cooker.py", line 1629, in updateCache self.parser = CookerParser(self, mcfilelist, total_masked) File "X/bitbake/lib/bb/cooker.py", line 2141, in __init__ self.bb_caches = bb.cache.MulticonfigCache(self.cfgbuilder, self.cfghash, cooker.caches_array) File "X/bitbake/lib/bb/cache.py", line 772, in __init__ loaded += c.prepare_cache(progress) File "X/bitbake/lib/bb/cache.py", line 435, in prepare_cache loaded = self.load_cachefile(progress) File "X/bitbake/lib/bb/cache.py", line 516, in load_cachefile progress(cachefile.tell() + previous_progress) File "X/bitbake/lib/bb/cache.py", line 751, in progress bb.event.fire(bb.event.CacheLoadProgress(current_progress, cachesize), File "X/bitbake/lib/bb/event.py", line 234, in fire fire_ui_handlers(event, d) File "X/bitbake/lib/bb/event.py", line 210, in fire_ui_handlers _ui_handlers[h].event.send(event) File "X/bitbake/lib/bb/cooker.py", line 117, in send str_event = codecs.encode(pickle.dumps(event), \'base64\').decode(\'utf-8\') File "/usr/lib/python3.10/asyncio/sslproto.py", line 320, in __del__ _warn(f"unclosed transport {self!r}", ResourceWarning, source=self) File "/usr/lib/python3.10/warnings.py", line 109, in _showwarnmsg sw(msg.message, msg.category, msg.filename, msg.lineno, File "X/bitbake/lib/bb/main.py", line 113, in _showwarning warnlog.warning(s) File "/usr/lib/python3.10/logging/__init__.py", line 1489, in warning self._log(WARNING, msg, args, **kwargs) File "/usr/lib/python3.10/logging/__init__.py", line 1624, in _log self.handle(record) File "/usr/lib/python3.10/logging/__init__.py", line 1634, in handle self.callHandlers(record) File "/usr/lib/python3.10/logging/__init__.py", line 1696, in callHandlers hdlr.handle(record) File "/usr/lib/python3.10/logging/__init__.py", line 968, in handle self.emit(record) File "X/bitbake/lib/bb/event.py", line 778, in emit fire(record, None) File "X/bitbake/lib/bb/event.py", line 234, in fire fire_ui_handlers(event, d) File "X/bitbake/lib/bb/event.py", line 197, in fire_ui_handlers with bb.utils.lock_timeout(_thread_lock): File "/usr/lib/python3.10/contextlib.py", line 135, in __enter__ return next(self.gen) File "X/bitbake/lib/bb/utils.py", line 1888, in lock_timeout bb.server.process.serverlog("Couldn\'t get the lock for 5 mins, timed out, exiting. %s" % traceback.format_stack()) or put in simpler terms, whilst sending an event(), an unrelated warning message happens to be triggered from asyncio: /usr/lib/python3.10/asyncio/sslproto.py:320: ResourceWarning: unclosed transport <asyncio.sslproto._SSLProtocolTransport object at 0x7f0e797d3100> which triggers a second event() which can't be sent as we're already in the critcal section and already hold the lock. That warning is due to the version of asyncio used on Ubuntu 22.04 with python 3.10 and that comined with timing issues explains why we don't see it on other python versions or distros. We can't handle the second event as the lock is there to serialise the events. Instead, we queue the event and then process the queue later. Add a new version of lock_timeout which allows us to handle the situation more gracefully. (Bitbake rev: 2c590ff1aff89d23b25ce808650f200013a1e6af) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: utils: Add signal blocking for lock_timeoutRichard Purdie2025-03-031-0/+2
| | | | | | | | | | We never want to exit whilst holding these locks as it deadlocks all python threads. Add signal blocking around the lock critical part so a signal shouldn't cause such an exit. (Bitbake rev: a097755c671e2b530dea6200a94b39fa9dca246c) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: utils: Tweak lock_timeout logicRichard Purdie2025-03-031-1/+1
| | | | | | | | | | We should really try and take the lock in the try/finally block so that in some rare cases such as badly timed interrupt/signal, we always release the lock. (Bitbake rev: a9eb8bf7174b6962b5ba07192fe95b8c7112d9d2) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: utils: Print information about lock issue before exitingRichard Purdie2025-03-031-0/+1
| | | | | | (Bitbake rev: cdf6c51a064f8f335c3262b7f102618996f1a229) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: lib/bb/build: remove mention of OE_EXTRA_IMPORTSRoss Burton2025-02-271-1/+1
| | | | | | | | | | | | This is an OpenEmbedded-specific variable that is no longer used[1]. [1] oe-core 1f56155e ("base: Switch to use addpylib directive and BB_GLOBAL_PYMODULES") (Bitbake rev: 34bfa55a3c14f5d1d6bb3e31b747906fa7cb99c3) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: lib: Remove double importsMichael Estner2025-02-2712-15/+2
| | | | | | | | | * Remove double imports mentioned by pylint (Bitbake rev: 741db6719efca5aa9ef2c15e60cdd624e4aa1a8d) Signed-off-by: Michael Estner <michaelestner@web.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: data_smart: fix indentationChen Qi2025-02-251-40/+40
| | | | | | | | | Fix 8 spaces indentation to be 4 spaces. (Bitbake rev: 973866d134f0493bb3034593fe03cb8bf8920c5c) Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: doc: bitbake-user-manual-ref-variables: document BB_CURRENT_MCAntonin Godard2025-02-251-0/+5
| | | | | | | | | | | Document the BB_CURRENT_MC variable, which holds the name of the current multiconfig build a task is being run under. (Bitbake rev: 178e09ea5ea39e60452077fa2ab90b90478ada6e) Signed-off-by: Antonin Godard <antonin.godard@bootlin.com> Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch2: Fix BB_FETCH_PREMIRRORONLY network disablingRichard Purdie2025-02-251-12/+15
| | | | | | | | | | | | When using BB_FETCH_PREMIRRORONLY we write to the datastore to disable the network. This change needs to be undo when handling later urls, so operate on a copy of the datastore to allow this. Reported by Julian Haller <julian.haller@philips.com> (Bitbake rev: 67a5ede8ae92ed7dcad29fd0dcfd62c6640b10b2) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: bblayers/query: Fix using "removeprefix" string methodJoerg Schmidt2025-02-211-1/+2
| | | | | | | | | | | | | | | | | The minimum Python version required for Yocto 5.0 is 3.8 which causes failure in poky/bitbake/lib/bblayers/query.py when listing layers by using command "bitbake-layers show-recipes -f --bare --mc MC" for the given multiconfig MC. The reason for that failure is the use of "removeprefix" string method which got introduced in Python 3.9. This patch replaces the "removeprefix" method with an equivalent solution supported by Python 3.8. (Bitbake rev: 004cfdec1c865f2351bbac99acb3d63bfef9d380) Signed-off-by: Joerg Schmidt <joerg.schmidt@garmin.com> Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: utils: Clean up importsMichael Estner2025-02-181-7/+3
| | | | | | | | | | * Remove double imports * Re-roder the imports as mentioned by pylint (Bitbake rev: 6de536bbaee8cf7664c5702a96a5ca18ad09fb9d) Signed-off-by: Michael Estner <michaelestner@web.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: bitbake: tests/data: add tests for variable flagsLouis Rannou2025-02-131-1/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | Check default flags are correctly returned by getVarFlags and check all flags are returned when internalflags is True. Check delVarFlags also removes default value. Check all flags are removed after delVar. Run the test with: $ bitbake-selftest -v bb.tests.data.TestFlags test_delflag (bb.tests.data.TestFlags.test_delflag) ... ok test_delvar (bb.tests.data.TestFlags.test_delvar) ... ok test_setflag (bb.tests.data.TestFlags.test_setflag) ... ok ---------------------------------------------------------------------- Ran 3 tests in 0.000s OK This is a test case for [YOCTO #15685] (Bitbake rev: ff8cae735cf489373af1aac7ee233d7b82d483d3) Signed-off-by: Louis Rannou <louis.rannou@non.se.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: bitbake: data_smart: fix ??= operator for variable flagsLouis Rannou2025-02-131-4/+11
| | | | | | | | | | | | | | | Variable flags have been fixed in commit 0329a7e3ac694737f2d2c1861f65492551360663 which introduces the "_defaultval_flag_" prefix for default values. This must not be ignored in delVarFlags and getVarFlags. Fixes [YOCTO #15685] (Bitbake rev: 2ee079fc1b7cf6d384ca17bd034b0a40461d9d18) Signed-off-by: Louis Rannou <louis.rannou@non.se.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch2: clearcase: remove double DL_DIR from localfileStefan Herbrechtsmeier2025-02-111-2/+0
| | | | | | | (Bitbake rev: bcf090ed631bbd523a5341baebba0765f1a847f8) Signed-off-by: Stefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch2: ssh: use common localpath handlingStefan Herbrechtsmeier2025-02-111-2/+1
| | | | | | | (Bitbake rev: 22ac6e84c70034a74f1729c7e0f31ca928fa1dea) Signed-off-by: Stefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch2: remove unnecessary unquoteStefan Herbrechtsmeier2025-02-114-5/+5
| | | | | | | | | | The URI path is already unquoted. Remove the unnecessary unquote function calls for URI path values. (Bitbake rev: 3de12bbc28b5a4189b849720735cf3e268d3941d) Signed-off-by: Stefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch2: local: use path variableStefan Herbrechtsmeier2025-02-112-6/+5
| | | | | | | | | | Use the path variable from the fetch data instead of decoding the path manually from the plain unexpanded url. (Bitbake rev: ad3a29fa6ea53741d4e1786de35f8e7fc4292e7a) Signed-off-by: Stefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch2: remove unnecessary expand function callsStefan Herbrechtsmeier2025-02-117-10/+11
| | | | | | | | | | | | The fetch data class already expands the type, host, path, user, pswd and parm variables. The fetcher classes already expand the localfile variable. The getVar function expands the returned string per default. Remove unnecessary expand function calls to simplify the code. (Bitbake rev: 1b1eb037b861fbf20491ac17e519e9eaf232b858) Signed-off-by: Stefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch2: remove duplicated code in url decode and encodeStefan Herbrechtsmeier2025-02-111-52/+14
| | | | | | | | | | Use the URI class to decode and encode an URL. Remove duplicate code and unify the behavior. (Bitbake rev: a5d569c94700f04b8193c6bccae5af619931b00f) Signed-off-by: Stefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: tests: fetch: quote URI password as per RFC3986Stefan Herbrechtsmeier2025-02-111-1/+4
| | | | | | | | | | The password must be quoted as per RFC3986 because it can contain reserved characters. (Bitbake rev: 5c53dbf0ad4385e1de7f2eef66565a1f05dae67a) Signed-off-by: Stefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: tests: fetch: use lower case hostnamesStefan Herbrechtsmeier2025-02-111-5/+5
| | | | | | | | | | Do not use upper case hostnames because the hostname is case insensitive and maybe decoded into lower case to follow the common style. (Bitbake rev: 554b7048412c4c67bf895a8b98822b54ac3a66db) Signed-off-by: Stefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: tests: fetch: add test for file URI with @Stefan Herbrechtsmeier2025-02-111-0/+24
| | | | | | | (Bitbake rev: f169704ef48f04da33aaca8b1ad5d8d7eabf8fd6) Signed-off-by: Stefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch2: do not decode user from file URIStefan Herbrechtsmeier2025-02-111-0/+3
| | | | | | | | | | A file URI can't contain a user. Do not treat the @ as reserved character for a file URI. (Bitbake rev: 11cf4062f48536547a352e24d6e963d91fdd1190) Signed-off-by: Stefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: b4-config: Add basic support for b4 contribution workflowQuentin Schulz2025-02-062-0/+44
| | | | | | | | | | | | | | | | | | | | | | | | | b4[1] is a very nice tool for mail-based contribution. A config[2] file exists to set up a few defaults. We can use it to set the To recipients to always add, in our case the mailing list. This also adds a wrapper script that is called by b4 to figure out which addresses to put as Cc recipients. Considering that patches to the doc/ directory also need to be sent to the yocto-docs mailing list, this wrapper handles that. A limitation of the script (lsdiff actually) is that it doesn't know how to handle empty files, but those should be of rather rare occurrences. Because we currently do not have anything to check for patch validity, remove requirement for b4 prep --check to be run before sending a patch series, via disable-needs-checking in prep-pre-flight-checks. [1] https://pypi.org/project/b4/ [2] https://b4.docs.kernel.org/en/latest/config.html (Bitbake rev: 8843860010c97cc10ff69205d209634639b6c5cd) Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: parse: Forbid ambiguous assignments to ${.}, ${+}, and ${:} variablesNikolai Merinov2025-02-052-1/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Old code that parse variable names in assignment commands behave differently for variables that ends with special symbol for single-character variable names and multi-character variable names. For example: A+="1" # Change variable ${A}, '+' glued to '=' A+ = "1" # Change variable ${A+} +="1" # Change variable ${+}, the '+' symbol not part of assignment operator + = "1" # Change variable ${+} New code would always assume that '.=', '+=', and ':=' is assignment operator. As result code like the following would raise parsing error +="value" While code with extra spaces would work as before + = "value" # Change variable ${+} This change allow to catch issues in code that generate bitbake configuration files in a manner like "echo ${VARNAME}+=${VALUE} >> conf/local.conf" (Bitbake rev: 93059aad13a12cd69d86368795c88e5349197d5d) Signed-off-by: Nikolai Merinov <n.merinov@inango-systems.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>