summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/fetch2
diff options
context:
space:
mode:
authorPeter Kjellerstedt <peter.kjellerstedt@axis.com>2023-04-29 03:23:29 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2023-05-25 10:33:15 +0100
commit5b4c7dc600f33f784618c98330d075a38f944fb1 (patch)
tree6916dd507de95c011c967372257cefa133ac6e5d /bitbake/lib/bb/fetch2
parentddc06f0a30eb4d512aa1c4b41e4a0dd8b9385d20 (diff)
downloadpoky-5b4c7dc600f33f784618c98330d075a38f944fb1.tar.gz
bitbake: fetch2/crate: Correct unpack for a crate that matches the recipe name
The crate fetcher handles a crate with a name that matches the recipe's name specially by placing the unpacked code in the current directory (which typically is ${S}) rather than together with the sources for the other crates. This broke when the URI names for all crates were changed recently to include the version in the name. Correct the crate fetcher to test against ${BP} instead of ${BPN}. Also add a test case to the selftests to avoid this breaking again. [Yocto #15012] (Bitbake rev: 9af52b748357d0c843ce2507ce4d119fd9c37008) 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>
Diffstat (limited to 'bitbake/lib/bb/fetch2')
-rw-r--r--bitbake/lib/bb/fetch2/crate.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/bitbake/lib/bb/fetch2/crate.py b/bitbake/lib/bb/fetch2/crate.py
index 2b8b6bc7a1..3310ed0050 100644
--- a/bitbake/lib/bb/fetch2/crate.py
+++ b/bitbake/lib/bb/fetch2/crate.py
@@ -98,8 +98,8 @@ class Crate(Wget):
98 save_cwd = os.getcwd() 98 save_cwd = os.getcwd()
99 os.chdir(rootdir) 99 os.chdir(rootdir)
100 100
101 pn = d.getVar('BPN') 101 bp = d.getVar('BP')
102 if pn == ud.parm.get('name'): 102 if bp == ud.parm.get('name'):
103 cmd = "tar -xz --no-same-owner -f %s" % thefile 103 cmd = "tar -xz --no-same-owner -f %s" % thefile
104 else: 104 else:
105 cargo_bitbake = self._cargo_bitbake_path(rootdir) 105 cargo_bitbake = self._cargo_bitbake_path(rootdir)