summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bitbake/lib/bb/fetch2/local.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/bitbake/lib/bb/fetch2/local.py b/bitbake/lib/bb/fetch2/local.py
index 690532d63a..7ea2f3b2e4 100644
--- a/bitbake/lib/bb/fetch2/local.py
+++ b/bitbake/lib/bb/fetch2/local.py
@@ -62,7 +62,12 @@ class Local(FetchMethod):
62 if filesdir: 62 if filesdir:
63 logger.debug(2, "Searching for %s in path: %s" % (path, filesdir)) 63 logger.debug(2, "Searching for %s in path: %s" % (path, filesdir))
64 newpath = os.path.join(filesdir, path) 64 newpath = os.path.join(filesdir, path)
65 if not os.path.exists(newpath) and path.find("*") == -1: 65 if not newpath or not os.path.exists(newpath) and path.find("*") != -1:
66 # For expressions using '*', best we can do is take the first directory in FILESPATH that exists
67 newpath = bb.utils.which(filespath, ".")
68 logger.debug(2, "Searching for %s in path: %s" % (path, newpath))
69 return newpath
70 if not os.path.exists(newpath):
66 dldirfile = os.path.join(d.getVar("DL_DIR", True), path) 71 dldirfile = os.path.join(d.getVar("DL_DIR", True), path)
67 logger.debug(2, "Defaulting to %s for %s" % (dldirfile, path)) 72 logger.debug(2, "Defaulting to %s for %s" % (dldirfile, path))
68 bb.utils.mkdirhier(os.path.dirname(dldirfile)) 73 bb.utils.mkdirhier(os.path.dirname(dldirfile))