Skip to contentSkip to conversation

fetch2/local: Add debug to include chosen path

PATCH New Richard Purdie 1 participant 1 message May 11, 2023

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fetch2/local: Add debug to include chosen path

The current debug lists all the potential search paths but not the end result which isn't helpful for debugging. Tweak to include the end result.

---
 lib/bb/fetch2/local.py | 2 ++
 1 file changed, 2 insertions(+)
lib/bb/fetch2/local.py +2 -0
index 8baec7d2e8..7d7668110e 100644
@@ -51,11 +51,13 @@ class Local(FetchMethod):
         path = urldata.decodedurl
         newpath = path
         if path[0] == "/":
+            logger.debug2("Using absolute %s" % (path))
             return [path]
         filespath = d.getVar('FILESPATH')
         if filespath:
             logger.debug2("Searching for %s in paths:\n    %s" % (path, "\n    ".join(filespath.split(":"))))
             newpath, hist = bb.utils.which(filespath, path, history=True)
+            logger.debug2("Using %s for %s" % (newpath, path))
             searched.extend(hist)
         return searched
 
Signature · 1 line
2.39.2