summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/tests/fetch.py
diff options
context:
space:
mode:
authorAlexander Kanavin <alex.kanavin@gmail.com>2022-12-09 09:58:40 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2022-12-11 16:33:19 +0000
commit6257744d790dfe128ba1cb19b3b5676dc2dc0128 (patch)
treebfa8759d34a76b55e04d7c532645055dedef0534 /bitbake/lib/bb/tests/fetch.py
parent91befcd1f39830b7d1edc70faa5e4ef2b7db9ab1 (diff)
downloadpoky-6257744d790dfe128ba1cb19b3b5676dc2dc0128.tar.gz
bitbake: fetch2/wget.py: correctly match versioned directories
When obtaining latest upstream versions, the code needs to check if the existing tarball is in a versioned directory (e.g. component-name/x.y/component-name-x.y.z.tar.gz) and if it is, it needs to first obtain the list of all such versioned directories and then check all of them by going one step up in the directory hierarchy. Existing code was returning a correct match when the component name did not have numbers, e.g. a check on 'source/epiphany/43/' would return 43, but was stopping too soon when the component name itself had numbers ('source/libxml2/2.10/' would return libxml2). This change ensures the last match is taken instead of the first. Also, adjust the fetcher tests to check that versioned directories are correctly traversed in this case (e.g. the step to go one level up is taken and a new tarball is discovered in a different versioned directory). (Bitbake rev: b6601be22c6d776327acdcd1fa931400f41ac786) Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> 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.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/bitbake/lib/bb/tests/fetch.py b/bitbake/lib/bb/tests/fetch.py
index 0af06e46e5..ad3d4dea7d 100644
--- a/bitbake/lib/bb/tests/fetch.py
+++ b/bitbake/lib/bb/tests/fetch.py
@@ -1401,6 +1401,9 @@ class FetchLatestVersionTest(FetcherTest):
1401 # http://www.cmake.org/files/v2.8/cmake-2.8.12.1.tar.gz 1401 # http://www.cmake.org/files/v2.8/cmake-2.8.12.1.tar.gz
1402 ("cmake", "/files/v2.8/cmake-2.8.12.1.tar.gz", "", "") 1402 ("cmake", "/files/v2.8/cmake-2.8.12.1.tar.gz", "", "")
1403 : "2.8.12.1", 1403 : "2.8.12.1",
1404 # https://download.gnome.org/sources/libxml2/2.9/libxml2-2.9.14.tar.xz
1405 ("libxml2", "/software/libxml2/2.9/libxml2-2.9.14.tar.xz", "", "")
1406 : "2.10.3",
1404 # 1407 #
1405 # packages with versions only in current directory 1408 # packages with versions only in current directory
1406 # 1409 #