summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com>2025-02-07 13:46:55 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2025-02-11 21:18:39 +0000
commitf17c51c6959f740b279814624b40c65d69827637 (patch)
treec5528ce47217b2e304b5aecc90dff325402ce971
parent3e543e8eaa18cecd9e360eecd3925b18e7a9058e (diff)
downloadpoky-f17c51c6959f740b279814624b40c65d69827637.tar.gz
bitbake: fetch2: local: use path variable
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>
-rw-r--r--bitbake/lib/bb/fetch2/__init__.py2
-rw-r--r--bitbake/lib/bb/fetch2/local.py9
2 files changed, 5 insertions, 6 deletions
diff --git a/bitbake/lib/bb/fetch2/__init__.py b/bitbake/lib/bb/fetch2/__init__.py
index 628cae023a..bd87f18be2 100644
--- a/bitbake/lib/bb/fetch2/__init__.py
+++ b/bitbake/lib/bb/fetch2/__init__.py
@@ -1236,7 +1236,7 @@ def get_checksum_file_list(d):
1236 found = False 1236 found = False
1237 paths = ud.method.localfile_searchpaths(ud, d) 1237 paths = ud.method.localfile_searchpaths(ud, d)
1238 for f in paths: 1238 for f in paths:
1239 pth = ud.decodedurl 1239 pth = ud.path
1240 if os.path.exists(f): 1240 if os.path.exists(f):
1241 found = True 1241 found = True
1242 filelist.append(f + ":" + str(os.path.exists(f))) 1242 filelist.append(f + ":" + str(os.path.exists(f)))
diff --git a/bitbake/lib/bb/fetch2/local.py b/bitbake/lib/bb/fetch2/local.py
index 7d7668110e..fda56a564e 100644
--- a/bitbake/lib/bb/fetch2/local.py
+++ b/bitbake/lib/bb/fetch2/local.py
@@ -29,11 +29,10 @@ class Local(FetchMethod):
29 29
30 def urldata_init(self, ud, d): 30 def urldata_init(self, ud, d):
31 # We don't set localfile as for this fetcher the file is already local! 31 # We don't set localfile as for this fetcher the file is already local!
32 ud.decodedurl = urllib.parse.unquote(ud.url.split("://")[1].split(";")[0]) 32 ud.basename = os.path.basename(ud.path)
33 ud.basename = os.path.basename(ud.decodedurl) 33 ud.basepath = ud.path
34 ud.basepath = ud.decodedurl
35 ud.needdonestamp = False 34 ud.needdonestamp = False
36 if "*" in ud.decodedurl: 35 if "*" in ud.path:
37 raise bb.fetch2.ParameterError("file:// urls using globbing are no longer supported. Please place the files in a directory and reference that instead.", ud.url) 36 raise bb.fetch2.ParameterError("file:// urls using globbing are no longer supported. Please place the files in a directory and reference that instead.", ud.url)
38 return 37 return
39 38
@@ -48,7 +47,7 @@ class Local(FetchMethod):
48 Return the local filename of a given url assuming a successful fetch. 47 Return the local filename of a given url assuming a successful fetch.
49 """ 48 """
50 searched = [] 49 searched = []
51 path = urldata.decodedurl 50 path = urldata.path
52 newpath = path 51 newpath = path
53 if path[0] == "/": 52 if path[0] == "/":
54 logger.debug2("Using absolute %s" % (path)) 53 logger.debug2("Using absolute %s" % (path))