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/cooker.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/cooker.py')
| -rw-r--r-- | bitbake/lib/bb/cooker.py | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/bitbake/lib/bb/cooker.py b/bitbake/lib/bb/cooker.py index 67bf925441..0e492b9be9 100644 --- a/bitbake/lib/bb/cooker.py +++ b/bitbake/lib/bb/cooker.py | |||
| @@ -443,7 +443,7 @@ class BBCooker: | |||
| 443 | continue | 443 | continue |
| 444 | except AttributeError: | 444 | except AttributeError: |
| 445 | pass | 445 | pass |
| 446 | logger.debug(1, "Marking as dirty due to '%s' option change to '%s'" % (o, options[o])) | 446 | logger.debug("Marking as dirty due to '%s' option change to '%s'" % (o, options[o])) |
| 447 | print("Marking as dirty due to '%s' option change to '%s'" % (o, options[o])) | 447 | print("Marking as dirty due to '%s' option change to '%s'" % (o, options[o])) |
| 448 | clean = False | 448 | clean = False |
| 449 | if hasattr(self.configuration, o): | 449 | if hasattr(self.configuration, o): |
| @@ -470,17 +470,17 @@ class BBCooker: | |||
| 470 | 470 | ||
| 471 | for k in bb.utils.approved_variables(): | 471 | for k in bb.utils.approved_variables(): |
| 472 | if k in environment and k not in self.configuration.env: | 472 | if k in environment and k not in self.configuration.env: |
| 473 | logger.debug(1, "Updating new environment variable %s to %s" % (k, environment[k])) | 473 | logger.debug("Updating new environment variable %s to %s" % (k, environment[k])) |
| 474 | self.configuration.env[k] = environment[k] | 474 | self.configuration.env[k] = environment[k] |
| 475 | clean = False | 475 | clean = False |
| 476 | if k in self.configuration.env and k not in environment: | 476 | if k in self.configuration.env and k not in environment: |
| 477 | logger.debug(1, "Updating environment variable %s (deleted)" % (k)) | 477 | logger.debug("Updating environment variable %s (deleted)" % (k)) |
| 478 | del self.configuration.env[k] | 478 | del self.configuration.env[k] |
| 479 | clean = False | 479 | clean = False |
| 480 | if k not in self.configuration.env and k not in environment: | 480 | if k not in self.configuration.env and k not in environment: |
| 481 | continue | 481 | continue |
| 482 | if environment[k] != self.configuration.env[k]: | 482 | if environment[k] != self.configuration.env[k]: |
| 483 | logger.debug(1, "Updating environment variable %s from %s to %s" % (k, self.configuration.env[k], environment[k])) | 483 | logger.debug("Updating environment variable %s from %s to %s" % (k, self.configuration.env[k], environment[k])) |
| 484 | self.configuration.env[k] = environment[k] | 484 | self.configuration.env[k] = environment[k] |
| 485 | clean = False | 485 | clean = False |
| 486 | 486 | ||
| @@ -488,7 +488,7 @@ class BBCooker: | |||
| 488 | self.configuration.env = environment | 488 | self.configuration.env = environment |
| 489 | 489 | ||
| 490 | if not clean: | 490 | if not clean: |
| 491 | logger.debug(1, "Base environment change, triggering reparse") | 491 | logger.debug("Base environment change, triggering reparse") |
| 492 | self.reset() | 492 | self.reset() |
| 493 | 493 | ||
| 494 | def runCommands(self, server, data, abort): | 494 | def runCommands(self, server, data, abort): |
| @@ -699,7 +699,7 @@ class BBCooker: | |||
| 699 | if depmc not in self.multiconfigs: | 699 | if depmc not in self.multiconfigs: |
| 700 | bb.fatal("Multiconfig dependency %s depends on nonexistent multiconfig configuration named configuration %s" % (k,depmc)) | 700 | bb.fatal("Multiconfig dependency %s depends on nonexistent multiconfig configuration named configuration %s" % (k,depmc)) |
| 701 | else: | 701 | else: |
| 702 | logger.debug(1, "Adding providers for multiconfig dependency %s" % l[3]) | 702 | logger.debug("Adding providers for multiconfig dependency %s" % l[3]) |
| 703 | taskdata[depmc].add_provider(localdata[depmc], self.recipecaches[depmc], l[3]) | 703 | taskdata[depmc].add_provider(localdata[depmc], self.recipecaches[depmc], l[3]) |
| 704 | seen.add(k) | 704 | seen.add(k) |
| 705 | new = True | 705 | new = True |
| @@ -1555,7 +1555,7 @@ class BBCooker: | |||
| 1555 | self.inotify_modified_files = [] | 1555 | self.inotify_modified_files = [] |
| 1556 | 1556 | ||
| 1557 | if not self.baseconfig_valid: | 1557 | if not self.baseconfig_valid: |
| 1558 | logger.debug(1, "Reloading base configuration data") | 1558 | logger.debug("Reloading base configuration data") |
| 1559 | self.initConfigurationData() | 1559 | self.initConfigurationData() |
| 1560 | self.handlePRServ() | 1560 | self.handlePRServ() |
| 1561 | 1561 | ||
