summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/fetch2/__init__.py
diff options
context:
space:
mode:
Diffstat (limited to 'bitbake/lib/bb/fetch2/__init__.py')
-rw-r--r--bitbake/lib/bb/fetch2/__init__.py16
1 files changed, 6 insertions, 10 deletions
diff --git a/bitbake/lib/bb/fetch2/__init__.py b/bitbake/lib/bb/fetch2/__init__.py
index c1523fc1c1..0fb718b23e 100644
--- a/bitbake/lib/bb/fetch2/__init__.py
+++ b/bitbake/lib/bb/fetch2/__init__.py
@@ -1222,25 +1222,21 @@ def get_checksum_file_list(d):
1222 SRC_URI as a space-separated string 1222 SRC_URI as a space-separated string
1223 """ 1223 """
1224 fetch = Fetch([], d, cache = False, localonly = True) 1224 fetch = Fetch([], d, cache = False, localonly = True)
1225
1226 dl_dir = d.getVar('DL_DIR')
1227 filelist = [] 1225 filelist = []
1228 for u in fetch.urls: 1226 for u in fetch.urls:
1229 ud = fetch.ud[u] 1227 ud = fetch.ud[u]
1230
1231 if ud and isinstance(ud.method, local.Local): 1228 if ud and isinstance(ud.method, local.Local):
1229 found = False
1232 paths = ud.method.localpaths(ud, d) 1230 paths = ud.method.localpaths(ud, d)
1233 for f in paths: 1231 for f in paths:
1234 pth = ud.decodedurl 1232 pth = ud.decodedurl
1235 if f.startswith(dl_dir): 1233 if os.path.exists(f):
1236 # The local fetcher's behaviour is to return a path under DL_DIR if it couldn't find the file anywhere else 1234 found = True
1237 if os.path.exists(f): 1235 filelist.append(f + ":" + str(os.path.exists(f)))
1238 bb.warn("Getting checksum for %s SRC_URI entry %s: file not found except in DL_DIR" % (d.getVar('PN'), os.path.basename(f))) 1236 if not found:
1239 else: 1237 bb.fatal(("Unable to get checksum for %s SRC_URI entry %s: file could not be found"
1240 bb.fatal(("Unable to get checksum for %s SRC_URI entry %s: file could not be found"
1241 "\nThe following paths were searched:" 1238 "\nThe following paths were searched:"
1242 "\n%s") % (d.getVar('PN'), os.path.basename(f), '\n'.join(paths))) 1239 "\n%s") % (d.getVar('PN'), os.path.basename(f), '\n'.join(paths)))
1243 filelist.append(f + ":" + str(os.path.exists(f)))
1244 1240
1245 return " ".join(filelist) 1241 return " ".join(filelist)
1246 1242