summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/tests/fetch.py
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2022-07-13 17:37:02 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2022-07-15 12:22:08 +0100
commit63935febda8ad316598e8f73f1e4cbf04fb47ef0 (patch)
tree650e162cbbf64fa5d67c985384f760418211153c /bitbake/lib/bb/tests/fetch.py
parent829bb416b8a4556f735b1d2da7971442b0d0cb8e (diff)
downloadpoky-63935febda8ad316598e8f73f1e4cbf04fb47ef0.tar.gz
bitbake: fetch2: Drop DL_DIR fallback for local file fetcher
A long time ago, we made DL_DIR a final fallback for the local fetcher. Since then we added checksum support and task hashes and the world has changed. There were warnings added some time ago if this fallback triggers and it is now time to drop it entirely. The original use case was for sstate however the sstate code now sets FILESPATH correctly so DL_DIR is no longer needed. There have been a few small bugs exposed by this change, missing mkdir calls and some minor test issues that needed tweaks. In general this simplifies and improves the fetcher code flow though. This completes a cleanup that ensures local files are correctly covered at parse time which ensures rebuilds and reparses happen at the right times. (Bitbake rev: 3e1444e536c71d3885ef6b9d428807163c309640) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/tests/fetch.py')
-rw-r--r--bitbake/lib/bb/tests/fetch.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/bitbake/lib/bb/tests/fetch.py b/bitbake/lib/bb/tests/fetch.py
index 20d7953f35..7fcf57e7ea 100644
--- a/bitbake/lib/bb/tests/fetch.py
+++ b/bitbake/lib/bb/tests/fetch.py
@@ -468,6 +468,7 @@ class MirrorUriTest(FetcherTest):
468 "http://.*/.* file:///someotherpath/downloads/" 468 "http://.*/.* file:///someotherpath/downloads/"
469 469
470 def test_urireplace(self): 470 def test_urireplace(self):
471 self.d.setVar("FILESPATH", ".")
471 for k, v in self.replaceuris.items(): 472 for k, v in self.replaceuris.items():
472 ud = bb.fetch.FetchData(k[0], self.d) 473 ud = bb.fetch.FetchData(k[0], self.d)
473 ud.setup_localpath(self.d) 474 ud.setup_localpath(self.d)
@@ -925,6 +926,7 @@ class FetcherNetworkTest(FetcherTest):
925 926
926 @skipIfNoNetwork() 927 @skipIfNoNetwork()
927 def test_fetch_file_mirror_of_mirror(self): 928 def test_fetch_file_mirror_of_mirror(self):
929 self.d.setVar("FILESPATH", ".")
928 self.d.setVar("MIRRORS", "http://.*/.* file:///some1where/ file:///some1where/.* file://some2where/ file://some2where/.* https://downloads.yoctoproject.org/releases/bitbake") 930 self.d.setVar("MIRRORS", "http://.*/.* file:///some1where/ file:///some1where/.* file://some2where/ file://some2where/.* https://downloads.yoctoproject.org/releases/bitbake")
929 fetcher = bb.fetch.Fetch(["http://invalid.yoctoproject.org/releases/bitbake/bitbake-1.0.tar.gz"], self.d) 931 fetcher = bb.fetch.Fetch(["http://invalid.yoctoproject.org/releases/bitbake/bitbake-1.0.tar.gz"], self.d)
930 os.mkdir(self.dldir + "/some2where") 932 os.mkdir(self.dldir + "/some2where")