diff options
author | Joshua Watt <JPEWhacker@gmail.com> | 2021-02-09 09:50:21 -0600 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2021-02-10 23:48:16 +0000 |
commit | 75f87db413f3659fee18eff389b7b339b01cce15 (patch) | |
tree | e733135549b516c72c4f34172b6bbf865377fc76 /bitbake/lib/bb/fetch2/local.py | |
parent | 7283a0b3b6ca49d0d2e13593333a580ef10439a8 (diff) | |
download | poky-75f87db413f3659fee18eff389b7b339b01cce15.tar.gz |
bitbake: logging: Make bitbake logger compatible with python logger
The bitbake logger overrode the definition of the debug() logging call
to include a debug level, but this causes problems with code that may
be using standard python logging, since the extra argument is
interpreted differently.
Instead, change the bitbake loggers debug() call to match the python
logger call and add a debug2() and debug3() API to replace calls that
were logging to a different debug level.
[RP: Small fix to ensure bb.debug calls bbdebug()]
(Bitbake rev: f68682a79d83e6399eb403f30a1f113516575f51)
Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/fetch2/local.py')
-rw-r--r-- | bitbake/lib/bb/fetch2/local.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/bitbake/lib/bb/fetch2/local.py b/bitbake/lib/bb/fetch2/local.py index 25d4557db6..e7d1c8c58f 100644 --- a/bitbake/lib/bb/fetch2/local.py +++ b/bitbake/lib/bb/fetch2/local.py | |||
@@ -54,12 +54,12 @@ class Local(FetchMethod): | |||
54 | return [path] | 54 | return [path] |
55 | filespath = d.getVar('FILESPATH') | 55 | filespath = d.getVar('FILESPATH') |
56 | if filespath: | 56 | if filespath: |
57 | logger.debug(2, "Searching for %s in paths:\n %s" % (path, "\n ".join(filespath.split(":")))) | 57 | logger.debug2("Searching for %s in paths:\n %s" % (path, "\n ".join(filespath.split(":")))) |
58 | newpath, hist = bb.utils.which(filespath, path, history=True) | 58 | newpath, hist = bb.utils.which(filespath, path, history=True) |
59 | searched.extend(hist) | 59 | searched.extend(hist) |
60 | if not os.path.exists(newpath): | 60 | if not os.path.exists(newpath): |
61 | dldirfile = os.path.join(d.getVar("DL_DIR"), path) | 61 | dldirfile = os.path.join(d.getVar("DL_DIR"), path) |
62 | logger.debug(2, "Defaulting to %s for %s" % (dldirfile, path)) | 62 | logger.debug2("Defaulting to %s for %s" % (dldirfile, path)) |
63 | bb.utils.mkdirhier(os.path.dirname(dldirfile)) | 63 | bb.utils.mkdirhier(os.path.dirname(dldirfile)) |
64 | searched.append(dldirfile) | 64 | searched.append(dldirfile) |
65 | return searched | 65 | return searched |