Commit Graph

7712 Commits

Author SHA1 Message Date
Richard Purdie
30fe072f6a bitbake: bitbake: Bump to version 2.15.0
Update version to 2.15.0 for the development series and features needed for
toolchain selection in OE.

(Bitbake rev: c2f29c9475c4b9cdd12af1f8610f2675f8fdd964)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2025-06-16 22:23:18 +01:00
hongxu
8bd8461212 bitbake: bitbake-getvar: skip info output of bitbake for quiet
Calling oe-debuginfod in a build failed:
...
$ oe-debuginfod
|Getting sysroot...
|Error: NOTE: Reconnecting to bitbake server...
|NOTE: Retrying server connection (#1)... (18:55:53.009687)
|path-to-build/tmp/work/x86_64-linux/elfutils-native/0.192/recipe-sysroot-native doesn't exist.
|Have you run 'bitbake elfutils-native -caddto_recipe_sysroot'?
...

The script oe-debuginfod calls bitbake-getvar to get sysroot, the
output of bitbake-getvar was mixed with info output of bitbake
...
NOTE: Reconnecting to bitbake server...
NOTE: Retrying server connection (#1)... (18:55:53.009687)
...

Set logger level to logging.WARNING to skip info output
for quiet

(Bitbake rev: 873c524e1a33846df8f34b7c87b298349277b3d5)

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2025-06-16 22:23:18 +01:00
Richard Purdie
32e44e2866 bitbake: ast/BBHandler: Add support for BB_DEFER_BBCLASSES
Add support for automatically promoting class inherits to deferred inherits
by listing them in the BB_DEFER_BBCLASSES variable.

(Bitbake rev: 8e741b2e885a12d119788d04aa4efcd724dd6bfa)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2025-06-16 22:23:18 +01:00
Richard Purdie
e20af03c02 bitbake: event: Add event for deferred inherits
Now that deferred inherits are extension specific, we can pass this
list to an event, which our metadata can use to set class overrides
earlier (as an example).

There are limitations to this, the list of classes is unexpanded and
recursive classes are not visible. There isn't much that can be done
about this, the ones we are interested in would usually be visible
at the top level (such as class extensions).

(Bitbake rev: 205d461c05fc7b4a7c81039af3bc3fd71cbb982c)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2025-06-16 22:23:18 +01:00
Richard Purdie
f2a15854e2 bitbake: ast: Change deferred inherits to happen per recipe
Currently deferred inherits get processed once for all class extensions
as a minor speed optimisation. Unfortunately this limits our options for
being able to report deferred classes to our code.

There are two challenges with using our deferred classes in OE at present.
One is that PACKAGECONFIG values don't work well with class overrides like
class-native if there are deferred classes based on PACKAGECONFIG, such
as python support. The second is that toolchain selection is proving
problematic to implement due to interactions between the toolchain deferred
inherit, the class extensions and class overrides being very late.

By changing deferred inherits to be recipe extension specific, we open
the way to generate events and "peek" at where things will end up,
allowing the class overrides to be set earlier.

The class extension code is updated to use a deferred inherit for the
class extension inheriting so that it is still inherited last.

(Bitbake rev: 29277cf4d88eb4dfa9572851177d009eab5afd0c)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2025-06-16 22:23:18 +01:00
Antonin Godard
4dc6974afe bitbake: doc: update releases.rst
Add Walnascar as a supported release manual, and move Styhead to the
outdated release manuals.

(Bitbake rev: 629aff734794568510c30939a4584cee2e0185ec)

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>
2025-06-12 09:56:42 +01:00
Robbin Van Damme
a2f77bbe0f bitbake: fetch/az: Add sanity check and clarify documentation
AZ_SAS token should be prefixed with a question mark. Add a sanity check for
this and fix the documentation.

[YOCTO #15882]

(Bitbake rev: 22011765202514600314732b97f1bb938e21f585)

Signed-off-by: Robbin Van Damme <robbinvandamme@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2025-06-02 22:17:43 +01:00
Richard Purdie
3993996279 bitbake: toaster/tests/buildtest: Switch to new CDN
The project is switching the way handle our CDN provision of sstate objects,
update the URL accordingly.

(Bitbake rev: 3372524cb961d95993b27fe4a8d794cdb7255e09)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2025-05-29 17:28:54 +01:00
Koch, Stefan
d8b0adfaac bitbake: tests/fetch: Add test case to check shallow cloning using PREMIRRORS
(Bitbake rev: 6e1434d93d489aa4bab07777a7a9dc58ba0ca5a7)

Signed-off-by: Stefan Koch <stefan-koch@siemens.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2025-05-28 12:37:02 +01:00
Stefan Koch
f5ae37fbd8 bitbake: fetch2: Ensure a valid symlink in PREMIRRORS case when using shallow cloning
- Since `ud.path` contains in that case the `PREMIRRORS` prefix path,
  this change ensures that a correct symlink is set up.

(Bitbake rev: 37ed18e45aa17406162efc5ee3ddb2d6b33d07b9)

Signed-off-by: Stefan Koch <stefan-koch@siemens.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2025-05-28 12:37:02 +01:00
Stefan Koch
0e9ce41a1c bitbake: fetch2: Move the ensure_symlink() function into the FetchMethod class
(Bitbake rev: d934763f91b9bda85f273a44f12a04a3ca19fc28)

Signed-off-by: Stefan Koch <stefan-koch@siemens.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2025-05-28 12:37:02 +01:00
Isaac True
a3bdd2144c bitbake: fetch2: add support for .debs containing uncompressed data tarballs
Some .deb files contain uncompressed data tarballs which do not have an
additional file extension after `.tar`. Add support for such cases while
preserving the existing behaviour.

(Bitbake rev: e3834deb427ceb1d1ae9a96c1e0dec990d7f3805)

Signed-off-by: Isaac True <isaac.true@emlix.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2025-05-28 12:37:02 +01:00
Benjamin Szőke
7c4e8e0def bitbake: runqueue: Optimize loop in scenequeue data construction
In scenequeue data generation loop, progress bar update in each cycle cause
a significant loss of speed. Remove progress bar update in for loop. It was
become quite fast (faster 30 times, about) without progress bar update.

(Bitbake rev: f775e53f1196e3e5d0ded277c061c5c268b3b28d)

Signed-off-by: Benjamin Szőke <egyszeregy@freemail.hu>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2025-05-27 09:01:37 +01:00
Joshua Watt
396e45480e bitbake: hashserv: Fix deprecation warning about sqlite adapter
The default adapters for sqlite datetime are deprecated as of Python
3.12, so implement our own.

[YOCTO #15333]

(Bitbake rev: 38a1d715bf58acbc9cb21eed413b3542c81cf15a)

Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2025-05-19 17:55:50 +01:00
Richard Purdie
e3d24e5cd8 bitbake: toaster/tests: Update after release numbering changes
(Bitbake rev: f06112286ad141f0d5e4ae75a29f83cdd564c2ec)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2025-05-16 07:13:18 +01:00
Yoann Congal
4ee5633889 bitbake: knotty: pass failed task logs through the log infrastructure
By switching from print() to bb.plain() to print failing task logs, we
allow them to be saved in BB_CONSOLELOG.

Fixes [YOCTO #15798]: This allows AB reproducibility test to save the
full log of the failing tasks and helps debugging.

(Bitbake rev: d3b3ad32da7c7ebf61814fc807f8667a37aa149b)

Signed-off-by: Yoann Congal <yoann.congal@smile.fr>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2025-05-16 07:13:18 +01:00
Richard Purdie
9bc47d6a4d bitbake: toaster/fixtures: Add whinlatter, drop styhead
Update the fixtures generator table and update the fixtures removing
styhead and adding whinlatter.

(Bitbake rev: 72b1dee84df641cb24bc726f2dfe8f1cf1555247)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2025-05-15 12:23:33 +01:00
Chen Qi
89d2b3876d bitbake: lib/bb/tests/fetch: add a test case to ensure git shallow fetch works for tag containing slash
Add a test case to ensure git shallow fetch succeeds for SRC_URI
with tag containing slash.

For example, we want to succeed for SRC_URI like below:
SRC_URI = "git://salsa.debian.org/debian/debianutils.git;protocol=https;branch=master;tag=debian/${PV}"

See the following link for more information:
https://bugzilla.yoctoproject.org/show_bug.cgi?id=15862

(Bitbake rev: 919d4cf6e688e67229c46d30c84d523b21936377)

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2025-05-15 10:05:49 +01:00
Chen Qi
07f08063c1 bitbake: fetch2/git: fix shallow clone for tag containing slash
If a tag contains slash, e.g., debian/5.22, then shallow clone
fails because it's using a wrong ref.

To reproduce the issue, add the following lines in local.conf:

  BB_GIT_SHALLOW = "1"
  BB_GENERATE_SHALLOW_TARBALLS = "1"

And then run 'bitbake debianutils -c fetch'.

What the original os.path.basename(ref) wanted to do is to remove
the strings such as refs/heads/. So we do it explitly to fix this
issue.

Fixes: [YOCTO #15862]

(Bitbake rev: c6d6999f1ed01e7445b8f177a888038edacf555c)

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2025-05-15 10:05:49 +01:00
Philip Lorenz
a7331c3992 bitbake: tests/fetch: Test gitsm with LFS
Add a test case to verify that the gitsm fetcher properly handles
repositories storing objects with LFS.

The test case verifies that LFS objects are fetched on the initial clone
but also ensures that consecutive updates extend the original clone with
any newly referenced LFS objects.

(Bitbake rev: 2a8722ddd155596862029f6ea34e1e92c77e0b7f)

Signed-off-by: Philip Lorenz <philip.lorenz@bmw.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2025-05-08 11:37:32 +01:00
Philip Lorenz
3eeac69385 bitbake: fetch2: Fix LFS object checkout in submodules
Skipping smudging prevents the LFS objects from replacing their
placeholder files when `git submodule update` actually checks out the
target revision in the submodule. Smudging cannot happen earlier as the
clone stored in `.git/modules` is bare.

This should be fine as long as all LFS objects are available in the
download cache (which they are after the other fixes are applied).

(Bitbake rev: d270e33a07c50bb9c08861cf9a6dc51e1fd2d874)

Signed-off-by: Philip Lorenz <philip.lorenz@bmw.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2025-05-08 11:37:32 +01:00
Philip Lorenz
eb6d89e9e6 bitbake: fetch2: Fix incorrect lfs parametrization for submodules
The existing code would pass `True` or `False` to the git fetcher. As
the fetcher expects `lfs` to be set to `1` this always lead to LFS
fetching being disabled.

(Bitbake rev: 5e487a5a096400271ed1e29b0df72903f2304e49)

Signed-off-by: Philip Lorenz <philip.lorenz@bmw.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2025-05-08 11:37:32 +01:00
Philip Lorenz
9962d198c8 bitbake: fetch2: Use git-lfs fetch to download objects
Its not clear which exact git-lfs versions failed to work with bare
repositories, however git-lfs 2.13.2 which is shipped by Debian 10 (i.e.
the oldest supported distribution by scarthgap) shows no issue when
fetching into a bare repository. Switch to git-lfs fetch which in turn
eliminates issues seen when using the gitsm fetcher with submodules
utilizing lfs.

In these scenarios, fetching of LFS objects did not actually happen as
the gitsm fetcher parametrizes the to be fetched repositories with
`bareclone=1` which in turn means that the target revision was never
checked out (and therefore no LFS objects were fetched).

(Bitbake rev: 501d3317df5780a5b0e3c2562b26ed276c1dbe90)

Signed-off-by: Philip Lorenz <philip.lorenz@bmw.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2025-05-08 11:37:32 +01:00
Philip Lorenz
74945e4678 bitbake: fetch2: Simplify git LFS detection
Its unclear why this function does not operate on the desired source
revision to begin with (which really should be the decider on whether a
particular source revision uses LFS or not). Simplify the decision logic
by always checking the `.gitattributes` file of the target revision.

(Bitbake rev: b3faa0ce5c0a6945f26b5b303a7f38c00d132397)

Signed-off-by: Philip Lorenz <philip.lorenz@bmw.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2025-05-08 11:37:32 +01:00
Philip Lorenz
7642477dc8 bitbake: fetch2: Check for git-lfs existence before using it
So far, existence of `git-lfs` was only checked during unpacking. As the
binary is also used in earlier steps also check for its existence there.

Additionally, factor out the LFS existence check into a dedicated
function and call it wherever git-lfs is used for the first time.

(Bitbake rev: 5818367db9b261b7e07c347d38044e6cba8f9727)

Signed-off-by: Philip Lorenz <philip.lorenz@bmw.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2025-05-08 11:37:32 +01:00
Philip Lorenz
62c4daafce bitbake: tests/fetch: Move commonly used imports to top
Avoid multiple import statements for anything that is used more than
once. Additionally, drop no longer used imports.

(Bitbake rev: 7c74310440f4d6ec47cf5bacf597e18308b3bb20)

Signed-off-by: Philip Lorenz <philip.lorenz@bmw.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2025-04-29 13:11:24 +01:00
Philip Lorenz
67990e1550 bitbake: fetch2: Clean up no longer used name parameter
There's no need to pass `name` when it is no longer used.

(Bitbake rev: b132d35dee643e270e3e6dd536dcc90334a0111c)

Signed-off-by: Philip Lorenz <philip.lorenz@bmw.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2025-04-29 13:11:24 +01:00
Antonin Godard
c807b703cd bitbake: doc: bitbake-user-manual-metadata: provide link to new doc
Replace the now obsolete paragraph of the "Other Functions" section by
a link to the new "Library Functions" document.

(Bitbake rev: 0eecb4b2ee4fe5339340ed0d08783aa03bf051cc)

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>
2025-04-24 11:53:00 +01:00
Antonin Godard
a035cd4718 bitbake: doc: add a new Library Functions document
Add a new document to the BitBake user manual that automatically
documents the library functions from their docstrings. The docstrings
can be formatted in reStructuredText.

Here logging utilities and the bb.utils module is documented. Some
members of the utils module were deliberately excluded as their usage is
most likely only internal to BitBake.

Fixes [YOCTO #9612]

(Bitbake rev: 0a711949acc2696f32a61c591ee3ea37041acb91)

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>
2025-04-24 11:53:00 +01:00
Antonin Godard
1215042fa7 bitbake: lib/bb: format and improve logging docstrings
Format the docstrings of the utils modules to be automatically
documented with the autodoc Sphinx extensions.

(Bitbake rev: 4963bfc6045ad1f49e721edd97766dab1e2d1edc)

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>
2025-04-24 11:53:00 +01:00
Antonin Godard
8c24921ba6 bitbake: utils: format and improve docstrings
Format the docstrings of the utils modules to be automatically
documented with the autodoc Sphinx extensions. Sphinx syntax can be used
in those for proper formatting. Cross-referencing with :term: is not
possible in these.

(Bitbake rev: 2fa1c7ad43639c6d25c94b7794bcce5f5ff74e10)

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>
2025-04-24 11:53:00 +01:00
Mark Asselstine
da63ef8c75 bitbake: utils: lock_timeout_nocheck() ensure l is initialized
lock_timeout_nocheck() can be interrupted immediately after enterring
the try-block and prior to initializing 'l', for example with a
ctrl-C, the code in finally will still be run and the 'if l' will
fail. Initialize 'l' as False to avoid this possiblity.

(Bitbake rev: 4885cd9d275ba2ab60e5c76aed856c34533cd3ae)

Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2025-04-24 11:53:00 +01:00
Richard Purdie
79fa12ae4b bitbake: parse/ConfHandler: Add warning for deprecated whitespace usage
A lack of whitespace around variable assignment operators makes the
files harder to read.

There is a deeper issue in that a "+" character can sometimes be confused
between the variable name and the assignment operator.

Start showing warnings for such usage so we encourage people to use
consistent whitespace which helps with file readability in general.

(Bitbake rev: 24772dd2ae6c0cd11540a260f15065f906fb0997)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2025-04-16 17:41:51 +01:00
Antonin Godard
43092d6e8d bitbake: doc/bitbake-user-manual-metadata.rst: fix python task example
Fix the old Python 2 print statement, replace it by a bb.plain() call
instead. Also replace time by datetime for a slightly simpler example.

[YOCTO #14670]

Reported-by: Robert Berger <pokylinux@reliableembeddedsystems.com>
(Bitbake rev: 874c607f475f3d60677d2720b80a28d0c2e963c6)

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>
2025-04-10 11:07:38 +01:00
Joshua Watt
820824f5fe bitbake: codeparser: Add function decorators for vardeps
Adds bb.parse.vardeps bb.parse.excludevardeps function decorators that
can be used to explicitly add or exclude variables from a python
function parsed by bitbake

(Bitbake rev: 030fb3dee067640a3a50f24a53d200bdb5048376)

Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2025-04-10 11:07:38 +01:00
Peter Marko
af91ed1691 bitbake: fetch/git: correct typo in comment and style
Correct typo Fash -> Fast.
With it also delete some trailing spaces which are unnecessary and
editors are trying to remove when changing anything in the file.

(Bitbake rev: b96040a0a066344527f0bc6ca4d09cda6b9d2f11)

Signed-off-by: Peter Marko <peter.marko@siemens.com>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2025-04-10 11:07:38 +01:00
Peter Marko
d1dae30b79 bitbake: fetch/git: always fetch lfs when creating shallow tarball
Before fast shallow tarballs the shallow tarball with lfs worked only
if the original .../downloads/git2/... directory existed. Once it was
not there, do_unpack on shallow tarball without lfs files failed due to
disabled network.
It was fixed for fast shallow tarballs and this commit fixes the other
scenarios, too.

This can happen when such shallow tarball is put to mirror or if
someone does cleanup to reclaim disk space.

(Bitbake rev: 4e6fb31a88448cdacf4e9f84cf0a8a8035f84d63)

Signed-off-by: Peter Marko <peter.marko@siemens.com>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2025-04-10 11:07:38 +01:00
Julian Haller
1def15acc2 bitbake: bitbake: tests/fetch: Fix git PREMIRRORONLY test
Using a shallow clone to simulate an outdated git mirror tarball does
not work in the intended way. A shallow clone already contains the
latest commit which can hide certain fetcher behavior. Simulate an
outdated mirror tarball, as the test titles indicate, by removing the
newer commits from the mirror.

(Bitbake rev: a51ee01f0a586fefd5a4061f4a1ca6cbf81b7046)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2025-04-10 11:07:38 +01:00
Julian Haller
f3948d6ee3 bitbake: bitbake: fetch: Fix BB_FETCH_PREMIRRORONLY for git mirror tarballs
When invoking the original git fetcher after downloading a mirror
tarball, BB_FETCH_PREMIRRORONLY is ignored. This leads to git fetch
commands targeting the upstream source being executed silently. Ensure
setting BB_NO_NETWORK before invoking the original fetcher. While this
was only observed for git, setting this in general for all fetcher
types makes sense at this location.

(Bitbake rev: 1b1321f2b60c0a66159e3f20c6befcb0b3ccc4c7)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2025-04-10 11:07:38 +01:00
Richard Purdie
49ec431d95 bitbake: fetch2/git: Handle srcrevs for annotated tags in tag check
If SRCREV points at an annotated tag, the comparision code can fail
as the resolved tag might not be the same sha.

Handle this by also resolving the SRCREV. We only need to do this if
they don't match in the first place for a minor performance win.

Also add a test for this.

(Bitbake rev: 136c06e251de68ed64355ec6b47a522ff3a372e3)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2025-04-03 11:03:43 +01:00
Richard Purdie
2d7f5904a8 bitbake: bitbake: Update version to 2.12.0 for release
(Bitbake rev: 5b4e20377eea8d428edf1aeb2187c18f82ca6757)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2025-03-29 15:28:51 +00:00
Ross Burton
43a2be2897 bitbake: tests/fetch: add a test for download paths without a proper filename
For example the miniupnpd recipe has a SRC_URI like this:

    http://miniupnp.tuxfamily.org/files/download.php?file=${BP}.tar.gz

In this case the path is /files/download.php, which isn't useful when
the latest_upstream logic bails early if there is no version in the path.

The logic now also checks in the downloadfilename, so add a test that
this works as expected.

(Bitbake rev: fffbf5d5e1c8556cddf0794e0b303bb0106747a0)

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2025-03-27 13:40:31 +00:00
Ross Burton
58c015cdd7 bitbake: tests/fetch: support setting PV in the wget fetcher
Some code paths in latest_versionstring() need PV to be set correctly.

(Bitbake rev: 0a9f90ff658e09feda63b398ec35715a65ff6193)

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2025-03-27 13:40:31 +00:00
Ross Burton
63246241f9 bitbake: tests/fetch: use a namedtuple for the wget test data
Use a named tuple so the test can access named members instead of just
accessing the data via index, which is harder to understand.

(Bitbake rev: 4b15652c84b06f0506c757e2647875a9b1cc7bfe)

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2025-03-27 13:40:31 +00:00
Ross Burton
c3fc67960e bitbake: bb/tests: use subtests when looping in a test case
Marking the test iterations as subtests means that when one fails, it
can identify clearly which iteration has failed.

(Bitbake rev: 52c55e681332d7cdbe06f3c9d9c8d77cb0cb93f6)

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2025-03-27 13:40:31 +00:00
Ross Burton
3233f3b231 bitbake: fetch2/wget: use long arguments for clarity
It's best practise to use long-form arguments in scripts where the
conciseness of short arguments is less useful than in an interactive
terminal.

(Bitbake rev: 54039bc9d169871af6d36578df4c21bff296f6de)

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2025-03-27 13:40:31 +00:00
Ross Burton
372a9c2d56 bitbake: fetch2/wget: don't conditionalise --continue
If the target file exists, we pass --continue so that wget will try to
resume the download instead of starting from the beginning.  However if
the file doesn't exist --continue has no effect, so there's no need to
conditionalise the use of the argument.

(Bitbake rev: a5ee50d4d2b2e6c00abe1551382afd9799345dbf)

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2025-03-27 13:40:31 +00:00
Ross Burton
f976a7d4fb bitbake: fetch2/wget: consider downloadfilename when checking for upstream
latest_versionstring() currently looks at just the end of the URI when
guessing what the filename to look for is, but this doesn't work if the
URL filename is not simple.

For example, miniupnpd has a SRC_URI of:

  http://miniupnp.tuxfamily.org/files/download.php?file=${BP}.tar.gz;downloadfilename=${BP}.tar.gz

The filename component of this is "download.php", which causes the
heuristics in latest_versionstring() to exit early.

Instead, if the downloadfilename is set then use that, as it's often the
actual filename that we're after.

(Bitbake rev: 2d5f135e997d13fabda0ad266fd5c928ee33f487)

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2025-03-27 13:40:31 +00:00
Christian Lindeberg
c00ad319d4 bitbake: fetch2/gomod: Fix mirroring problem
Build the 'downloadfilename' parameter by replacing path separators in
the module path like the git fetcher builds the mirror tar ball name.
Copy the downloaded file in the fetcher's unpack method like the crate
fetcher instead of calling the base fetcher's unpack method.

(Bitbake rev: 7762cea087597019460d66b04268757bd46befdf)

Signed-off-by: Christian Lindeberg <christian.lindeberg@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2025-03-27 11:19:33 +00:00
Richard Purdie
2d66669b8c bitbake: bitbake: Bump version to 2.9.2
After the fetcher revisions changes, we need a new version marker to
match this with in OE-Core.

(Bitbake rev: 8cc976e2792fdde3900729f3b09dd18ab640b5e8)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2025-03-25 14:29:18 +00:00