summaryrefslogtreecommitdiffstats
path: root/bitbake
diff options
context:
space:
mode:
authorStefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com>2025-02-07 13:47:01 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2025-11-07 13:15:34 +0000
commit740b8d5c6aad0e344faaf670354200db0f3b76f6 (patch)
treec66574f7ae750a27843905e92c75e283f182bcec /bitbake
parent828a9dffdb2abddc705ea986229e87a44021a7ad (diff)
downloadpoky-740b8d5c6aad0e344faaf670354200db0f3b76f6.tar.gz
bitbake: fetch2: use localpath instead of localfile
Use localpath variable instead of localfile and DL_DIR variable. (Bitbake rev: 7e77317b7ee37d17d56aaf2b36afc53df5489331) Signed-off-by: Stefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com> Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake')
-rw-r--r--bitbake/lib/bb/fetch2/az.py3
-rw-r--r--bitbake/lib/bb/fetch2/repo.py2
-rw-r--r--bitbake/lib/bb/fetch2/sftp.py3
-rw-r--r--bitbake/lib/bb/fetch2/wget.py2
4 files changed, 4 insertions, 6 deletions
diff --git a/bitbake/lib/bb/fetch2/az.py b/bitbake/lib/bb/fetch2/az.py
index 1d3664f213..27e9c3b39f 100644
--- a/bitbake/lib/bb/fetch2/az.py
+++ b/bitbake/lib/bb/fetch2/az.py
@@ -51,8 +51,7 @@ class Az(Wget):
51 fetchcmd = self.basecmd + ' --retry-connrefused --waitretry=5' 51 fetchcmd = self.basecmd + ' --retry-connrefused --waitretry=5'
52 52
53 # We need to provide a localpath to avoid wget using the SAS 53 # We need to provide a localpath to avoid wget using the SAS
54 # ud.localfile either has the downloadfilename or ud.path 54 localpath = ud.localpath
55 localpath = os.path.join(d.getVar("DL_DIR"), ud.localfile)
56 bb.utils.mkdirhier(os.path.dirname(localpath)) 55 bb.utils.mkdirhier(os.path.dirname(localpath))
57 fetchcmd += " -O %s" % shlex.quote(localpath) 56 fetchcmd += " -O %s" % shlex.quote(localpath)
58 57
diff --git a/bitbake/lib/bb/fetch2/repo.py b/bitbake/lib/bb/fetch2/repo.py
index fa4cb8149b..5c0edf1f22 100644
--- a/bitbake/lib/bb/fetch2/repo.py
+++ b/bitbake/lib/bb/fetch2/repo.py
@@ -46,7 +46,7 @@ class Repo(FetchMethod):
46 def download(self, ud, d): 46 def download(self, ud, d):
47 """Fetch url""" 47 """Fetch url"""
48 48
49 if os.access(os.path.join(d.getVar("DL_DIR"), ud.localfile), os.R_OK): 49 if os.access(ud.localpath, os.R_OK):
50 logger.debug("%s already exists (or was stashed). Skipping repo init / sync.", ud.localpath) 50 logger.debug("%s already exists (or was stashed). Skipping repo init / sync.", ud.localpath)
51 return 51 return
52 52
diff --git a/bitbake/lib/bb/fetch2/sftp.py b/bitbake/lib/bb/fetch2/sftp.py
index bee71a0d0d..c916283609 100644
--- a/bitbake/lib/bb/fetch2/sftp.py
+++ b/bitbake/lib/bb/fetch2/sftp.py
@@ -89,8 +89,7 @@ class SFTP(FetchMethod):
89 port = '-P %d' % urlo.port 89 port = '-P %d' % urlo.port
90 urlo.port = None 90 urlo.port = None
91 91
92 dldir = d.getVar('DL_DIR') 92 lpath = ud.localpath
93 lpath = os.path.join(dldir, ud.localfile)
94 93
95 user = '' 94 user = ''
96 if urlo.userinfo: 95 if urlo.userinfo:
diff --git a/bitbake/lib/bb/fetch2/wget.py b/bitbake/lib/bb/fetch2/wget.py
index 4d19e2134b..d79722348f 100644
--- a/bitbake/lib/bb/fetch2/wget.py
+++ b/bitbake/lib/bb/fetch2/wget.py
@@ -104,7 +104,7 @@ class Wget(FetchMethod):
104 fetchcmd = self.basecmd 104 fetchcmd = self.basecmd
105 105
106 dldir = os.path.realpath(d.getVar("DL_DIR")) 106 dldir = os.path.realpath(d.getVar("DL_DIR"))
107 localpath = os.path.join(dldir, ud.localfile) + ".tmp" 107 localpath = ud.localpath + ".tmp"
108 bb.utils.mkdirhier(os.path.dirname(localpath)) 108 bb.utils.mkdirhier(os.path.dirname(localpath))
109 fetchcmd += " --output-document=%s" % shlex.quote(localpath) 109 fetchcmd += " --output-document=%s" % shlex.quote(localpath)
110 110